Skip to content

Commit

Permalink
Squash exceptions during class enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberiaResurrection committed Dec 27, 2016
1 parent 1328c6d commit d685691
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Providers/MetadataControllerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,15 @@ public function boot()
$ends = array();
$Classes = $AutoClass::$classMap;
foreach ($Classes as $name => $file) {
if (in_array("AlgoWeb\\PODataLaravel\\Controllers\\MetadataControllerTrait", class_uses($name))) {
$ends[] = new $name();
try {
if (in_array(
"AlgoWeb\\PODataLaravel\\Controllers\\MetadataControllerTrait",
class_uses($name, false)
)) {
$ends[] = new $name();
}
} catch (\Exception $e) {
// Squash exceptions thrown here so app can continue booting
}
}

Expand Down

0 comments on commit d685691

Please sign in to comment.