Pretty exceptions only in debug

Fixes issue with Pretty Exceptions catching all unhandled exceptions in any mode, any debug state. There MUST not be any semi-global exception handler for applications in production environments as it can lead to serious information leakage issues.