From fb5e5594bea149ca730bc6424dc547dab3347747 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 14 Jun 2013 20:53:12 +0200 Subject: Fix issue #82 : ajout direct de Minz sans devoir faire appel au script ./build.sh --- lib/minz/exceptions/MinzException.php | 94 +++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 lib/minz/exceptions/MinzException.php (limited to 'lib/minz/exceptions/MinzException.php') diff --git a/lib/minz/exceptions/MinzException.php b/lib/minz/exceptions/MinzException.php new file mode 100644 index 000000000..8fca5ec16 --- /dev/null +++ b/lib/minz/exceptions/MinzException.php @@ -0,0 +1,94 @@ +route = $route; + + $message = 'Route `' . $route . '` not found'; + + parent::__construct ($message, $code); + } + + public function route () { + return $this->route; + } +} +class PDOConnectionException extends MinzException { + public function __construct ($string_connection, $user, $code = self::ERROR) { + $message = 'Access to database is denied for `' . $user . '`' + . ' (`' . $string_connection . '`)'; + + parent::__construct ($message, $code); + } +} +class CurrentPagePaginationException extends MinzException { + public function __construct ($page) { + $message = 'Page number `' . $page . '` doesn\'t exist'; + + parent::__construct ($message, self::ERROR); + } +} -- cgit v1.2.3