Page MenuHomePhabricator

phlog can be improved
Closed, ResolvedPublic

Description

See P1793. The exception information should by doing phlog($ex) is not very useful and can be improved. Some discussion in IRC (https://secure.phabricator.com/chatlog/channel/6/?at=201457).

Related Objects

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Infrastructure.
joshuaspence added a subscriber: joshuaspence.

Having a look at this and I can't actually remember what the issue is.

I think it was that phlog($ex) gives us the stack trace of the phlog() call, but if we have to pick one stack trace, the stack trace of the exception is more useful.

Given that we now do OK stuff for proxy/aggregate exceptions, maybe the best trace would be:

$proxy = new PhutilProxyException('phlog', $ex);
$trace = PhutilErrorHandler::getExceptionTrace($proxy);

I think that will give us a reasonable combined trace that helps identify both stacks.