From fb57be5a5af3a2fb46b2dbf2b503ffe78eb5cf49 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 21 Oct 2012 18:47:57 +0200 Subject: First commit --- lib/exceptions/MinzException.php | 94 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 lib/exceptions/MinzException.php (limited to 'lib/exceptions/MinzException.php') diff --git a/lib/exceptions/MinzException.php b/lib/exceptions/MinzException.php new file mode 100644 index 000000000..8fca5ec16 --- /dev/null +++ b/lib/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