Skip to content

Commit

Permalink
Use report function when exception was thrown.
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Jan 21, 2021
1 parent c4011d5 commit d3a857a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use NunoMaduro\Collision\Adapters\Laravel\Inspector;
use NunoMaduro\Collision\SolutionsRepositories\NullSolutionsRepository;
use NunoMaduro\Collision\Writer;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Exception\ExceptionInterface;
use Throwable;
use Butschster\Exchanger\Contracts\Exchange\IncomingRequest;
Expand All @@ -32,13 +31,7 @@ public function report(Throwable $e)
return;
}

$logger = $this->container->make(LoggerInterface::class);

if (method_exists($logger, 'handleException')) {
$logger->handleException($this, $e);
} else {
$logger->error($e);
}
report($e);
}

public function shouldReport(Throwable $e)
Expand Down

0 comments on commit d3a857a

Please sign in to comment.