X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faction.php;h=a4cae7066c0e06b34ccf3012d151333498b46993;hb=171b4f72ee5a84d2a67b99aca7df9406e68f60c1;hp=50370c09feca6086b4b1a68a03f26b9ed174b111;hpb=22577b17edf1d901ed4f8a3089ed539d89e5f1e4;p=quix0rs-gnu-social.git diff --git a/lib/action.php b/lib/action.php index 50370c09fe..a4cae7066c 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=400) { + $action = $this->trimmed('action'); + common_debug("User error '$code' on '$action': $msg", __FILE__); + common_user_error($msg, $code); + } }