Skip to content

Commit

Permalink
[#14733] - Added exceptions for the connection
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Feb 8, 2020
1 parent fbbcacd commit 4fad008
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 0 deletions.
24 changes: 24 additions & 0 deletions phalcon/DM/Pdo/Exception/CannotBindValue.zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by AtlasPHP
*
* @link https://github.com/atlasphp/Atlas.Pdo
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md
*/

namespace Phalcon\DM\Pdo\Exception;

/**
* Could not bind a value to a placeholder in a statement, generally because
* the value is an array, object, or resource.
*/
class CannotBindValue extends Exception
{
}
24 changes: 24 additions & 0 deletions phalcon/DM/Pdo/Exception/CannotDisconnect.zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by AtlasPHP
*
* @link https://github.com/atlasphp/Atlas.Pdo
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md
*/

namespace Phalcon\DM\Pdo\Exception;

/**
* ExtendedPdo could not disconnect; e.g., because its PDO connection was
* created externally and then injected.
*/
class CannotDisconnect extends Exception
{
}
23 changes: 23 additions & 0 deletions phalcon/DM/Pdo/Exception/ConnectionNotFound.zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by AtlasPHP
*
* @link https://github.com/atlasphp/Atlas.Pdo
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md
*/

namespace Phalcon\DM\Pdo\Exception;

/**
* Locator could not find a named connection.
*/
class ConnectionNotFound extends Exception
{
}
23 changes: 23 additions & 0 deletions phalcon/DM/Pdo/Exception/Exception.zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by AtlasPHP
*
* @link https://github.com/atlasphp/Atlas.Pdo
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md
*/

namespace Phalcon\DM\Pdo\Exception;

/**
* Base Exception class
*/
class Exception extends \Exception
{
}
23 changes: 23 additions & 0 deletions phalcon/DM/Pdo/Exception/MissingParameter.zep
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*
* Implementation of this file has been influenced by AtlasPHP
*
* @link https://github.com/atlasphp/Atlas.Pdo
* @license https://github.com/atlasphp/Atlas.Pdo/blob/1.x/LICENSE.md
*/

namespace Phalcon\DM\Pdo\Exception;

/**
* Missing a parameter in the values bound to a statement
*/
class MissingParameter extends Exception
{
}

0 comments on commit 4fad008

Please sign in to comment.