projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
225ab41
)
improve exception error reporting
author
Alan
<alan@roojs.com>
Thu, 5 Oct 2023 02:33:55 +0000
(10:33 +0800)
committer
Alan
<alan@roojs.com>
Thu, 5 Oct 2023 02:33:55 +0000
(10:33 +0800)
Pman.php
patch
|
blob
|
history
diff --git
a/Pman.php
b/Pman.php
index
d4ceec3
..
eebe773
100644
(file)
--- a/
Pman.php
+++ b/
Pman.php
@@
-1081,7
+1081,10
@@
class Pman extends HTML_FlexyFramework_Page
$reported = true;
$reported = true;
- $out = is_a($ex,'Exception') || is_a($ex, 'Error') ? $ex->getMessage() : $ex->toString();
+ $out = (is_a($ex,'Exception') || is_a($ex, 'Error') ? $ex->getMessage() : $ex->toString()) .
+ ' ' . $_SERVER['REQUEST_METHOD'] . ' ' .
+ (empty($_SERVER['REQUEST_URI']) ? 'No URL' : $_SERVER['REQUEST_URI']) .
+ ' ' . (empty($POST) ? '' : file_get_contents('php://input')) ;
//print_R($bt); exit;
//print_R($bt); exit;
@@
-1101,11
+1104,7
@@
class Pman extends HTML_FlexyFramework_Page
//convert the huge backtrace into something that is readable..
$out .= "\n" . implode("\n", $ret);
//convert the huge backtrace into something that is readable..
$out .= "\n" . implode("\n", $ret);
-
- $de = ini_set('display_errors', 0);
- trigger_error($out , E_USER_NOTICE); // note this should enable backtracing the real erorr?
- ini_set('display_errors', $de );
-
+
$this->addEvent("EXCEPTION", false, $out);
if ($this->showErrorToUser) {
$this->addEvent("EXCEPTION", false, $out);
if ($this->showErrorToUser) {