In a chat edit, put it directly after the silly line, then follow it with a sad violin for a mock-dramatic apology, or let a cartoon slip finish the gag when the joke keeps going wrong.