Skip to content

Commit

Permalink
Suppress only specific database exception
Browse files Browse the repository at this point in the history
Allow all other exceptions to fall throw.
Fixes zfcampus#364
Does not conflict with zfcampus#304
  • Loading branch information
Naktibalda committed Sep 21, 2016
1 parent 2db3dec commit e19446e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Model/DbAutodiscoveryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function fetchColumns($module, $version, $adapter_name)

try {
$metadata = new Metadata($adapter);
} catch (\Exception $e) {
} catch (\InvalidArgumentException $e) {
if (strpos($e->getMessage(), 'Unknown adapter platform') === false) {
throw $e;
}
return [];
}

Expand Down

0 comments on commit e19446e

Please # to comment.