Properly handle uncaught exceptions in queue_push[_front].