added common global exception handler.