Setup a global exception handler.