move all exception declaration to their own file

This commit is contained in:
Gilles Crettenand
2015-05-29 09:39:25 +02:00
parent 16860ce7f7
commit 28b4b8a985
6 changed files with 50 additions and 49 deletions

View File

@@ -2,12 +2,6 @@
require_once('DbMapping.php');
class BookNotFoundException extends WebException {
public function __construct($code) {
parent::__construct('BookNotFound', "The book with code $code was not found", -404);
}
}
/**
* AudioBook is mapped on a Notice from NetBiblio
*

View File

@@ -52,22 +52,6 @@ class Connection
final private function __clone() {}
}
class SqlException extends Exception
{
private $query;
public function __construct($message = "Sql Error", $query = "")
{
$this->query = $query;
parent::__construct($message, 0);
}
public function getSqlError()
{
return $this->getMessage().' while executing: '.$this->query;
}
}
class OdbcResultSet implements Iterator, ArrayAccess
{
public $length;

View File

@@ -120,9 +120,3 @@ abstract class DbMapping
return $result;
}
}
/**
* Exception raised when an invalid attribute name is accessed
*/
class InvalidAttributeException extends Exception { }