Skip to content

Commit

Permalink
Allow interfaces in the excluded_exceptions option
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterHolvoet committed Mar 12, 2021
1 parent 12dca27 commit 64c4622
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.7.1] - 2021-03-12
### Added
- Allow interfaces in the excluded_exceptions option

## [1.7.0] - 2021-03-05
### Added
- Add an HTTP endpoint for setting the Sentry release ID
Expand Down
8 changes: 7 additions & 1 deletion src/Logger/Sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,13 @@ protected function isLogLevelIncluded(int $level): bool

protected function isExceptionIncluded(string $type): bool
{
return !in_array($type, $this->config->get('excluded_exceptions'), true);
foreach ($this->config->get('excluded_exceptions') as $excludedClass) {
if (is_a($type, $excludedClass, true)) {
return false;
}
}

return true;
}

protected function normalizePaths(array $paths): array
Expand Down

0 comments on commit 64c4622

Please sign in to comment.