Place it right after the visible mistake, as the punchline of the scene, then follow it with Cartoon Slip for a physical gag or Wrong Answer Game Show when the error was a bad choice. Put Nelson's Ha-Ha! after it only when someone else is laughing at the failure, so the sequence moves from admission to consequence.