diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-22 12:37:45 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-22 12:37:45 -0700 |
commit | 26f49de0dd5673584e734152d2d3329b90eb6978 (patch) | |
tree | 2ba00544c77cc3bfe0cafb4fa8fe60ce73d31d79 /lib/servererroraction.php | |
parent | c85228eadc60b50ed6e7c9cba596c3e66f5214b2 (diff) | |
parent | 27bfd1211d64298ee3c3b2d82d7b38ca1e1167ad (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
lib/attachmentlist.php
Diffstat (limited to 'lib/servererroraction.php')
-rw-r--r-- | lib/servererroraction.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/servererroraction.php b/lib/servererroraction.php index 0993a63bc..9b5a553dc 100644 --- a/lib/servererroraction.php +++ b/lib/servererroraction.php @@ -62,15 +62,18 @@ class ServerErrorAction extends ErrorAction 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported'); - function __construct($message='Error', $code=500) + function __construct($message='Error', $code=500, $ex=null) { parent::__construct($message, $code); $this->default = 500; // Server errors must be logged. - - common_log(LOG_ERR, "ServerErrorAction: $code $message"); + $log = "ServerErrorAction: $code $message"; + if ($ex) { + $log .= "\n" . $ex->getTraceAsString(); + } + common_log(LOG_ERR, $log); } // XXX: Should these error actions even be invokable via URI? |