From bb1b6c377cc046fc306fe9cc65f83d78715cf43e Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Thu, 11 Dec 2014 10:48:00 +0000 Subject: [PATCH] Log error when "Internal Server Error" page is shown --- src/mibew/libs/classes/Mibew/Application.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mibew/libs/classes/Mibew/Application.php b/src/mibew/libs/classes/Mibew/Application.php index dd1af763..a84b9c46 100644 --- a/src/mibew/libs/classes/Mibew/Application.php +++ b/src/mibew/libs/classes/Mibew/Application.php @@ -153,6 +153,16 @@ class Application implements $response = new Response($content, $http_status); } catch (\Exception $e) { + trigger_error( + sprintf( + 'Application stopped because of uncaught exception %s "%s" (%s:%u)', + get_class($e), + $e->getMessage(), + $e->getFile(), + $e->getLine() + ), + E_USER_WARNING + ); $response = new Response('Internal Server Error', 500); }