-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger: shows error message in console #486
Conversation
Output looks like this:
Build failure is unrelated to the PR, symplify/ecs seems to be broken. |
I wouldn't put a sentence |
I usually enable debug mode, to see stack trace, etc. Writing into log may fail. What about |
If it's been logged, there's no need to do anything. |
Good point, changed. With log
Without log
|
Great! |
@@ -319,8 +319,12 @@ public static function exceptionHandler(\Throwable $exception): void | |||
require self::$errorTemplate ?: __DIR__ . '/assets/error.500.phtml'; | |||
})(empty($e)); | |||
} elseif (PHP_SAPI === 'cli') { | |||
@fwrite(STDERR, 'ERROR: application encountered an error and can not continue. ' | |||
. (isset($e) ? "Unable to log error.\n" : "Error was logged.\n")); // @ triggers E_NOTICE when strerr is closed since PHP 7.4 | |||
// @ triggers E_NOTICE when strerr is closed since PHP 7.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dg there's a typo strerr
should be stderr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
serepes
I just don't think there is a reason to not show error message in console. But I may be wrong, let me know if I missed something.