aboutsummaryrefslogtreecommitdiff
path: root/src/Phorkie/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'src/Phorkie/Exception')
-rw-r--r--src/Phorkie/Exception/Input.php17
-rw-r--r--src/Phorkie/Exception/NotFound.php16
2 files changed, 33 insertions, 0 deletions
diff --git a/src/Phorkie/Exception/Input.php b/src/Phorkie/Exception/Input.php
new file mode 100644
index 0000000..2b675c1
--- /dev/null
+++ b/src/Phorkie/Exception/Input.php
@@ -0,0 +1,17 @@
+<?php
+namespace Phorkie;
+
+/**
+ * Input from e.g. the URL is invalid, like a non-numeric string when one was
+ * expected
+ */
+class Exception_Input extends Exception
+{
+ public function __construct($msg = '', $code = 0)
+ {
+ parent::__construct($msg, $code);
+ $this->httpStatusCode = 400;
+ }
+}
+
+?>
diff --git a/src/Phorkie/Exception/NotFound.php b/src/Phorkie/Exception/NotFound.php
new file mode 100644
index 0000000..a62d1f1
--- /dev/null
+++ b/src/Phorkie/Exception/NotFound.php
@@ -0,0 +1,16 @@
+<?php
+namespace Phorkie;
+
+/**
+ * Something could not be found
+ */
+class Exception_NotFound extends Exception
+{
+ public function __construct($msg = '', $code = 0)
+ {
+ parent::__construct($msg, $code);
+ $this->httpStatusCode = 404;
+ }
+}
+
+?>