Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15402484
D13150.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
983 B
Referenced Files
None
Subscribers
None
D13150.diff
View Options
diff --git a/src/error/phlog.php b/src/error/phlog.php
--- a/src/error/phlog.php
+++ b/src/error/phlog.php
@@ -20,12 +20,20 @@
);
foreach (func_get_args() as $event) {
- PhutilErrorHandler::dispatchErrorMessage(
- $event instanceof Exception
- ? PhutilErrorHandler::EXCEPTION
- : PhutilErrorHandler::PHLOG,
- $event,
- $metadata);
+ $data = $metadata;
+ if ($event instanceof Exception) {
+ $type = PhutilErrorHandler::EXCEPTION;
+ // If this is an exception, proxy it and generate a composite trace which
+ // shows both where the phlog() was called and where the exception was
+ // originally thrown from.
+ $proxy = new PhutilProxyException('', $event);
+ $trace = PhutilErrorHandler::getExceptionTrace($proxy);
+ $data['trace'] = $trace;
+ } else {
+ $type = PhutilErrorHandler::PHLOG;
+ }
+
+ PhutilErrorHandler::dispatchErrorMessage($type, $event, $data);
}
return $value;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 10:45 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708913
Default Alt Text
D13150.diff (983 B)
Attached To
Mode
D13150: Improve the stack traces from phlog($exception)
Attached
Detach File
Event Timeline
Log In to Comment