Page MenuHomePhabricator

Let the top-level exception handler dump a stack trace if we reach debug mode before things go sideways
ClosedPublic

Authored by epriestley on Feb 11 2019, 9:10 PM.
Tags
None
Referenced Files
F18836422: D20142.diff
Mon, Oct 27, 12:52 AM
F18817928: D20142.diff
Tue, Oct 21, 7:32 PM
F18798491: D20142.id48103.diff
Fri, Oct 17, 6:36 AM
F18790612: D20142.id.diff
Wed, Oct 15, 4:00 PM
F18742633: D20142.id.diff
Thu, Oct 2, 8:46 PM
F18739406: D20142.diff
Wed, Oct 1, 9:18 PM
F18617888: D20142.id48099.diff
Sep 14 2025, 10:30 PM
F18617844: D20142.diff
Sep 14 2025, 10:22 PM
Subscribers
None
Tokens
"100" token, awarded by joshuaspence.

Details

Summary

Depends on D20140. Ref T13250. Currently, the top-level exception handler doesn't dump stacks because we might not be in debug mode, and we might double-extra-super fatal if we call PhabricatorEnv:... to try to figure out if we're in debug mode or not.

We can get around this by setting a flag on the Sink once we're able to confirm that we're in debug mode. Then it's okay for the top-level error handler to show traces.

There's still some small possibility that showing a trace could make us double-super-fatal since we have to call a little more code, but AphrontStackTraceView is pretty conservative about what it does and 99% of the time this is a huge improvement.

Test Plan

Screen Shot 2019-02-11 at 1.00.45 PM.png (1×1 px, 350 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

amckinley added inline comments.
src/aphront/sink/AphrontHTTPSink.php
7–8

I just happened to notice this "do install" typo.

This revision is now accepted and ready to land.Feb 11 2019, 11:05 PM
  • Just remove that comment since we don't do either one, even though they're technically possible.
This revision was automatically updated to reflect the committed changes.