@@ -182,7 +182,7 @@ function () use ($debugbar) {
182
182
$ this ->app ['events ' ]->subscribe ($ eventCollector );
183
183
184
184
} catch (\Exception $ e ) {
185
- $ this ->addException (
185
+ $ this ->addThrowable (
186
186
new Exception (
187
187
'Cannot add EventCollector to Laravel Debugbar: ' . $ e ->getMessage (),
188
188
$ e ->getCode (),
@@ -203,7 +203,7 @@ function ($view) use ($debugbar) {
203
203
}
204
204
);
205
205
} catch (\Exception $ e ) {
206
- $ this ->addException (
206
+ $ this ->addThrowable (
207
207
new Exception (
208
208
'Cannot add ViewCollector to Laravel Debugbar: ' . $ e ->getMessage (), $ e ->getCode (), $ e
209
209
)
@@ -215,7 +215,7 @@ function ($view) use ($debugbar) {
215
215
try {
216
216
$ this ->addCollector ($ this ->app ->make ('Barryvdh\Debugbar\DataCollector\IlluminateRouteCollector ' ));
217
217
} catch (\Exception $ e ) {
218
- $ this ->addException (
218
+ $ this ->addThrowable (
219
219
new Exception (
220
220
'Cannot add RouteCollector to Laravel Debugbar: ' . $ e ->getMessage (),
221
221
$ e ->getCode (),
@@ -253,7 +253,7 @@ function ($level, $message, $context) use ($logger) {
253
253
$ this ->addCollector (new MonologCollector ($ this ->app ['log ' ]->getMonolog ()));
254
254
}
255
255
} catch (\Exception $ e ) {
256
- $ this ->addException (
256
+ $ this ->addThrowable (
257
257
new Exception (
258
258
'Cannot add LogsCollector to Laravel Debugbar: ' . $ e ->getMessage (), $ e ->getCode (), $ e
259
259
)
@@ -313,7 +313,7 @@ function ($query, $bindings = null, $time = null, $connectionName = null) use ($
313
313
}
314
314
);
315
315
} catch (\Exception $ e ) {
316
- $ this ->addException (
316
+ $ this ->addThrowable (
317
317
new Exception (
318
318
'Cannot add listen to Queries for Laravel Debugbar: ' . $ e ->getMessage (),
319
319
$ e ->getCode (),
@@ -334,7 +334,7 @@ function ($query, $bindings = null, $time = null, $connectionName = null) use ($
334
334
$ this ['messages ' ]->aggregate (new SwiftLogCollector ($ mailer ));
335
335
}
336
336
} catch (\Exception $ e ) {
337
- $ this ->addException (
337
+ $ this ->addThrowable (
338
338
new Exception (
339
339
'Cannot add MailCollector to Laravel Debugbar: ' . $ e ->getMessage (), $ e ->getCode (), $ e
340
340
)
@@ -347,7 +347,7 @@ function ($query, $bindings = null, $time = null, $connectionName = null) use ($
347
347
$ file = $ this ->app ['config ' ]->get ('debugbar.options.logs.file ' );
348
348
$ this ->addCollector (new LogsCollector ($ file ));
349
349
} catch (\Exception $ e ) {
350
- $ this ->addException (
350
+ $ this ->addThrowable (
351
351
new Exception (
352
352
'Cannot add LogsCollector to Laravel Debugbar: ' . $ e ->getMessage (), $ e ->getCode (), $ e
353
353
)
@@ -373,7 +373,7 @@ function ($query, $bindings = null, $time = null, $connectionName = null) use ($
373
373
);
374
374
$ this ->addCollector ($ authCollector );
375
375
} catch (\Exception $ e ) {
376
- $ this ->addException (
376
+ $ this ->addThrowable (
377
377
new Exception (
378
378
'Cannot add AuthCollector to Laravel Debugbar: ' . $ e ->getMessage (), $ e ->getCode (), $ e
379
379
)
@@ -430,7 +430,7 @@ public function stopMeasure($name)
430
430
try {
431
431
$ collector ->stopMeasure ($ name );
432
432
} catch (\Exception $ e ) {
433
- // $this->addException ($e);
433
+ // $this->addThrowable ($e);
434
434
}
435
435
}
436
436
}
@@ -439,13 +439,24 @@ public function stopMeasure($name)
439
439
* Adds an exception to be profiled in the debug bar
440
440
*
441
441
* @param Exception $e
442
+ * @deprecated in favor of addThrowable
442
443
*/
443
444
public function addException (Exception $ e )
445
+ {
446
+ return $ this ->addThrowable ($ e );
447
+ }
448
+
449
+ /**
450
+ * Adds an exception to be profiled in the debug bar
451
+ *
452
+ * @param Exception $e
453
+ */
454
+ public function addThrowable ($ e )
444
455
{
445
456
if ($ this ->hasCollector ('exceptions ' )) {
446
457
/** @var \DebugBar\DataCollector\ExceptionsCollector $collector */
447
458
$ collector = $ this ->getCollector ('exceptions ' );
448
- $ collector ->addException ($ e );
459
+ $ collector ->addThrowable ($ e );
449
460
}
450
461
}
451
462
@@ -480,7 +491,7 @@ public function modifyResponse(Request $request, Response $response)
480
491
481
492
// Show the Http Response Exception in the Debugbar, when available
482
493
if (isset ($ response ->exception )) {
483
- $ this ->addException ($ response ->exception );
494
+ $ this ->addThrowable ($ response ->exception );
484
495
}
485
496
486
497
if ($ this ->shouldCollect ('config ' , false )) {
@@ -489,7 +500,7 @@ public function modifyResponse(Request $request, Response $response)
489
500
$ configCollector ->setData ($ app ['config ' ]->all ());
490
501
$ this ->addCollector ($ configCollector );
491
502
} catch (\Exception $ e ) {
492
- $ this ->addException (
503
+ $ this ->addThrowable (
493
504
new Exception (
494
505
'Cannot add ConfigCollector to Laravel Debugbar: ' . $ e ->getMessage (),
495
506
$ e ->getCode (),
@@ -510,7 +521,7 @@ public function modifyResponse(Request $request, Response $response)
510
521
try {
511
522
$ this ->addCollector (new SessionCollector ($ sessionManager ));
512
523
} catch (\Exception $ e ) {
513
- $ this ->addException (
524
+ $ this ->addThrowable (
514
525
new Exception (
515
526
'Cannot add SessionCollector to Laravel Debugbar: ' . $ e ->getMessage (),
516
527
$ e ->getCode (),
@@ -527,7 +538,7 @@ public function modifyResponse(Request $request, Response $response)
527
538
try {
528
539
$ this ->addCollector (new SymfonyRequestCollector ($ request , $ response , $ sessionManager ));
529
540
} catch (\Exception $ e ) {
530
- $ this ->addException (
541
+ $ this ->addThrowable (
531
542
new Exception (
532
543
'Cannot add SymfonyRequestCollector to Laravel Debugbar: ' . $ e ->getMessage (),
533
544
$ e ->getCode (),
@@ -542,7 +553,7 @@ public function modifyResponse(Request $request, Response $response)
542
553
try {
543
554
$ this ->addCollector (new ClockworkCollector ($ request , $ response , $ sessionManager ));
544
555
} catch (\Exception $ e ) {
545
- $ this ->addException (
556
+ $ this ->addThrowable (
546
557
new Exception (
547
558
'Cannot add ClockworkCollector to Laravel Debugbar: ' . $ e ->getMessage (),
548
559
$ e ->getCode (),
0 commit comments