Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3472688
D25955.1744750769.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25955.1744750769.diff
View Options
diff --git a/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php b/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
--- a/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
+++ b/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php
@@ -42,7 +42,18 @@
}
$class = get_class($throwable);
- $message = $throwable->getMessage();
+
+ if (PhabricatorEnv::getEnvConfig('phabricator.developer-mode')) {
+ // Include last location in error: Get absolute path, strip /phorge/
+ // /webroot, and remove it as path prefix not to expose full server path
+ $root_dir_len = strlen(substr(realpath($_SERVER['DOCUMENT_ROOT']), 0,
+ -14));
+ $filename = substr($throwable->getFile(), $root_dir_len);
+ $message = '"'.$throwable->getMessage().'" at ['.$filename.':'.
+ $throwable->getLine().']';
+ } else {
+ $message = $throwable->getMessage();
+ }
if ($throwable instanceof AphrontSchemaQueryException) {
$message .= "\n\n".pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 15, 20:59 (9 h, 32 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1281047
Default Alt Text
D25955.1744750769.diff (1 KB)
Attached To
Mode
D25955: Unhandled Exception: Add last call to error message
Attached
Detach File
Event Timeline
Log In to Comment