Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit a2d47a3

Browse files
author
Michael Grauer
committed
BUG: refs #0381. Improved level of detail in production error reporting.
1 parent 581e95a commit a2d47a3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

core/controllers/components/NotifyErrorComponent.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ public function fatalEror($logger, $mailer)
4646
switch($environment)
4747
{
4848
case 'production':
49-
$message .= "It seems you have just encountered an unknown issue.";
50-
$message .= "Our team has been notified and will deal with the problem as soon as possible.";
51-
49+
$message = "The system has encountered the following error:<br/><h3>";
50+
$message .= $e->message . "<br/>";
51+
$message .= "In " . $e->file . ", line: " . $e->line . "<br/>";
52+
$message .= "At " . date("H:i:s Y-m-d") . "</h3><br/>";
53+
$message .= "Please notify your administrator with this information.<br/>";
5254
if($e['type'] == E_NOTICE)
5355
{
5456
$e['typeText'] = 'E_NOTICE';
@@ -273,8 +275,11 @@ public function getShortErrorMessage()
273275
switch($this->_environment)
274276
{
275277
case 'production':
276-
$message .= "It seems you have just encountered an unknown issue.";
277-
$message .= "Our team has been notified and will deal with the problem as soon as possible.";
278+
$message = "The system has encountered the following error:<br/><h3>";
279+
$message .= $this->_error->exception->getMessage() . "<br/>";
280+
$message .= "In " . $this->_error->exception->getFile() . ", line: " . $this->_error->exception->getLine() . "<br/>";
281+
$message .= "At " . date("H:i:s Y-m-d") . "</h3><br/>";
282+
$message .= "Please notify your administrator with this information.<br/>";
278283
break;
279284
default:
280285
$message .= "Message: " . $this->_error->exception->getMessage() . "\n\n";

0 commit comments

Comments
 (0)