Skip to content

Commit 9f366f6

Browse files
[10.x] Add Method to Report only logged exceptions (#47554)
* add report error * Fix linting * fix linting * rename method --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent be745b8 commit 9f366f6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Illuminate/Foundation/Exceptions/Handler.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,19 @@ public function report(Throwable $e)
247247
return;
248248
}
249249

250+
$this->reportThrowable($e);
251+
}
252+
253+
/**
254+
* Reports error based on report method on exception or to logger.
255+
*
256+
* @param \Throwable $e
257+
* @return void
258+
*
259+
* @throws \Throwable
260+
*/
261+
protected function reportThrowable(Throwable $e): void
262+
{
250263
if (Reflector::isCallable($reportCallable = [$e, 'report']) &&
251264
$this->container->call($reportCallable) !== false) {
252265
return;

0 commit comments

Comments
 (0)