-
-
Notifications
You must be signed in to change notification settings - Fork 17
Add error code & show function arguments #125
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
Changes from all commits
1b70e6e
017ad67
b5e3c60
cdbadac
20947a8
77764e7
e9928a1
0ab8034
8b79e26
7d369db
852c311
28b647d
0257fda
a5b892b
61ef967
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ | |
| private LoggerInterface $logger, | ||
| private ThrowableRendererInterface $defaultRenderer, | ||
| private ?EventDispatcherInterface $eventDispatcher = null, | ||
| private int $exitShutdownHandlerDepth = 2 | ||
|
Check warning on line 53 in src/ErrorHandler.php
|
||
| ) { | ||
| } | ||
|
|
||
|
|
@@ -68,7 +68,7 @@ | |
| $renderer ??= $this->defaultRenderer; | ||
|
|
||
| try { | ||
| $this->logger->error($t->getMessage(), ['throwable' => $t]); | ||
|
Check warning on line 71 in src/ErrorHandler.php
|
||
| return $this->debug ? $renderer->renderVerbose($t, $request) : $renderer->render($t, $request); | ||
| } catch (Throwable $t) { | ||
| return new ErrorData((string) $t); | ||
|
|
@@ -108,14 +108,14 @@ | |
| return; | ||
| } | ||
|
|
||
| if ($this->memoryReserveSize > 0) { | ||
|
Check warning on line 111 in src/ErrorHandler.php
|
||
| $this->memoryReserve = str_repeat('x', $this->memoryReserveSize); | ||
| } | ||
|
|
||
| $this->initializeOnce(); | ||
|
Check warning on line 115 in src/ErrorHandler.php
|
||
|
|
||
| // Handles throwable that isn't caught otherwise, echo output and exit. | ||
| set_exception_handler(function (Throwable $t): void { | ||
|
Check warning on line 118 in src/ErrorHandler.php
|
||
| if (!$this->enabled) { | ||
| return; | ||
| } | ||
|
|
@@ -129,12 +129,13 @@ | |
| return false; | ||
| } | ||
|
|
||
| if (!(error_reporting() & $severity)) { | ||
|
Check warning on line 132 in src/ErrorHandler.php
|
||
| // This error code is not included in error_reporting. | ||
| return true; | ||
| } | ||
|
|
||
| $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | ||
| $backtrace = debug_backtrace(0); | ||
|
Check warning on line 137 in src/ErrorHandler.php
|
||
| array_shift($backtrace); | ||
| throw new ErrorException($message, $severity, $severity, $file, $line, null, $backtrace); | ||
| }); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.