]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
Index and Action use Exceptions
[quix0rs-gnu-social.git] / lib / action.php
index c4172ada1135293fd2ce5a5d7c3487cfb7184c8a..9fbabb4fcb37cb676e4cf9762fe9f8c5782f24b9 100644 (file)
@@ -789,11 +789,12 @@ class Action extends HTMLOutputter // lawsuit
      *
      * @return nothing
      */
+
     function serverError($msg, $code=500)
     {
         $action = $this->trimmed('action');
         common_debug("Server error '$code' on '$action': $msg", __FILE__);
-        common_server_error($msg, $code);
+        throw new ServerException($msg, $code);
     }
 
     /**
@@ -804,11 +805,12 @@ class Action extends HTMLOutputter // lawsuit
      *
      * @return nothing
      */
+
     function clientError($msg, $code=400)
     {
         $action = $this->trimmed('action');
         common_debug("User error '$code' on '$action': $msg", __FILE__);
-        common_user_error($msg, $code);
+        throw new ClientException($msg, $code);
     }
 
     /**