Skip to content

Commit

Permalink
Fixed ambiguous exception in Cake\Database\Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Dec 30, 2016
1 parent 7963286 commit 03435ee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Database/Connection.php
Expand Up @@ -24,7 +24,6 @@
use Cake\Database\Schema\CachedCollection;
use Cake\Database\Schema\Collection as SchemaCollection;
use Cake\Datasource\ConnectionInterface;
use Exception;

/**
* Represents a connection with a database server.
Expand Down Expand Up @@ -214,7 +213,7 @@ public function connect()
$this->_driver->connect();

return true;
} catch (Exception $e) {
} catch (\Exception $e) {
throw new MissingConnectionException(['reason' => $e->getMessage()]);
}
}
Expand Down Expand Up @@ -653,7 +652,7 @@ public function transactional(callable $callback)

try {
$result = $callback($this);
} catch (Exception $e) {
} catch (\Exception $e) {
$this->rollback();
throw $e;
}
Expand Down Expand Up @@ -686,7 +685,7 @@ public function disableConstraints(callable $callback)

try {
$result = $callback($this);
} catch (Exception $e) {
} catch (\Exception $e) {
$this->enableForeignKeys();
throw $e;
}
Expand Down

0 comments on commit 03435ee

Please sign in to comment.