summaryrefslogtreecommitdiff
path: root/modules/rest/libraries/Rest_Exception.php
diff options
context:
space:
mode:
authorNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
committerNathan Kinkade <nkinkade@nkinka.de>2010-07-08 00:29:37 +0000
commitc83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (patch)
tree482cf980e87cd7c80c28a89bb9395eba6b53026f /modules/rest/libraries/Rest_Exception.php
parenta0b0b415515bff5f9edd43d373e8e78f3b3f8e4d (diff)
parent9d66783f47636153bf3661d1d89e694dd5188c36 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/rest/libraries/Rest_Exception.php')
-rw-r--r--modules/rest/libraries/Rest_Exception.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/rest/libraries/Rest_Exception.php b/modules/rest/libraries/Rest_Exception.php
index 505c2e7a..087da939 100644
--- a/modules/rest/libraries/Rest_Exception.php
+++ b/modules/rest/libraries/Rest_Exception.php
@@ -18,8 +18,11 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Rest_Exception_Core extends Kohana_Exception {
- public function __construct($message, $code) {
+ var $response = array();
+
+ public function __construct($message, $code, $response=array()) {
parent::__construct($message, null, $code);
+ $this->response = $response;
}
public function sendHeaders() {
@@ -27,4 +30,8 @@ class Rest_Exception_Core extends Kohana_Exception {
header("HTTP/1.1 " . $this->getCode() . " " . $this->getMessage());
}
}
+
+ public function getTemplate() {
+ return "error_rest.json";
+ }
} \ No newline at end of file