1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-09 16:32:39 +01:00

If a PhutilProxyException is thrown by Arcanist, print all error messages.

Summary: `PhutilProxyException` provides the capability to nest exceptions. However, if we throw a `PhutilProxyException` then we currently only display the error message from the top-most exception. Instead, we should print all of the nested exception messages.

Test Plan: Faked an error, saw multiple lines of exception messages.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9697
This commit is contained in:
Joshua Spence 2014-06-24 09:24:00 +10:00
parent c727a98f73
commit 69cd86fa4f

View file

@ -365,10 +365,19 @@ try {
}
if (!$is_usage) {
echo phutil_console_format(
"**Exception**\n%s\n%s\n",
$ex->getMessage(),
'(Run with --trace for a full exception trace.)');
echo phutil_console_format("**Exception**\n");
while ($ex) {
echo $ex->getMessage()."\n";
if ($ex instanceof PhutilProxyException) {
$ex = $ex->getPreviousException();
} else {
$ex = null;
}
}
echo "(Run with --trace for a full exception trace.)\n";
}
exit(1);