summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php
index 50370c09f..b2374b1d2 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -60,4 +60,16 @@ class Action { // lawsuit
return $def;
}
}
+
+ function server_error($msg, $code=500) {
+ $action = $this->trimmed('action');
+ common_debug("Server error '$code' on '$action': $msg", __FILE__);
+ common_server_error($msg, $code);
+ }
+
+ function client_error($msg, $code=500) {
+ $action = $this->trimmed('action');
+ common_debug("User error '$code' on '$action': $msg", __FILE__);
+ common_user_error($msg, $code);
+ }
}