Skip to content
Permalink
Browse files

Fixed ambiguous exception in Cake\Database\Connection

  • Loading branch information...
ondrejmirtes committed Dec 29, 2016
1 parent 7963286 commit 03435eeb971dc2d0aed70b8c4b28e6dd97380fba
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/Database/Connection.php
@@ -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.
@@ -214,7 +213,7 @@ public function connect()
$this->_driver->connect();
return true;
} catch (Exception $e) {
} catch (\Exception $e) {
throw new MissingConnectionException(['reason' => $e->getMessage()]);
}
}
@@ -653,7 +652,7 @@ public function transactional(callable $callback)
try {
$result = $callback($this);
} catch (Exception $e) {
} catch (\Exception $e) {
$this->rollback();
throw $e;
}
@@ -686,7 +685,7 @@ public function disableConstraints(callable $callback)
try {
$result = $callback($this);
} catch (Exception $e) {
} catch (\Exception $e) {
$this->enableForeignKeys();
throw $e;
}

0 comments on commit 03435ee

Please sign in to comment.
You can’t perform that action at this time.