If in doubt, ignore the accident. The only time it might be appropriate to say "No" is if you catch him as he squats (the aim then is merely to surprise him enough to interrupt the toilet and whisk him outside — rather than punish). The risk with punishment is the dog links "No" to toileting in your presence, rather than the place. This can actually inhibit toilet training as the dog then becomes shy about performing in your presence.