Skip to content

Loading…

Added "NotImplementedException" to exceptions.php #624

Merged
merged 1 commit into from

2 participants

@tPl0ch

For the sake of HTTP standards, added a NotImplementedException, which I frequently use in APIs.

@markstory markstory merged commit 474eb89 into cakephp:2.2
@markstory
CakePHP member

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 25, 2012
  1. Added NotImplementedException with status code 501

    Thomas Ploch committed
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/Cake/Error/exceptions.php
View
15 lib/Cake/Error/exceptions.php
@@ -555,3 +555,18 @@ public function __construct($message, $code = 500, $file = null, $line = null) {
}
}
+
+/**
+ * Not Implemented Exception - used when an API method is not implemented
+ *
+ * @package Cake.Error
+ */
+class NotImplementedException extends CakeException {
+
+ protected $_messageTemplate = '%s is not implemented.';
+
+ public function __construct($message, $code = 501) {
+ parent::__construct($message, $code);
+ }
+
+}
Something went wrong with that request. Please try again.