Kevin submitted an exception handler found in a C++ codebase to The Daily WTF. It catches Exception::Deadlock and executes a single statement: retry. That is not a C++ keyword, so it must be a macro, most likely one wrapping a goto that jumps back to the top of the guarded block.

exception handler
catch (Exception::Deadlock)
{
 retry;
}

The problem is fundamental. A deadlock means this thread waits on a resource held by another thread, which in turn waits on a resource held by this thread. Retrying only helps if the retry first releases the resources this thread holds, letting the other thread proceed. According to Kevin, this retry does no such thing. It simply jumps back up, holding everything, guaranteeing the same deadlock again.

The kicker: the codebase already suffered from a pile of deadlocks, so the company brought in a highly paid consultant to fix them by reordering access and tracing mutex usage. This handler is the result of that engagement. Kevin's verdict: it seems the consultant wanted to add some deadlocks of their own.