Environment check in ExceptionListener