Avoid fatal errors when reporting exceptions.