Skip to content

Commit

Permalink
Add exception of trace filtering feature
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Feb 28, 2022
1 parent a2b11e6 commit 83d097e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Guanguans\Notify\Messages\Message;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Request;
Expand Down Expand Up @@ -194,6 +195,9 @@ protected function collectInformation(Throwable $exception): array
->filter(function ($trace) {
return isset($trace['file']) and isset($trace['line']);
})
->when(is_callable($this->_collector['exception_stack_trace']), function (Collection $traces) {
return $traces->filter($this->_collector['exception_stack_trace']);
})
->map(function ($trace) {
return $trace['file']."({$trace['line']})";
})
Expand Down

0 comments on commit 83d097e

Please sign in to comment.