Page MenuHomePhabricator

Let "phlog()" log Throwables
ClosedPublic

Authored by epriestley on Feb 11 2019, 9:18 PM.
Tags
None
Referenced Files
F13236701: D20143.diff
Tue, May 21, 10:31 AM
F13230608: D20143.diff
Mon, May 20, 11:06 PM
F13219040: D20143.id48102.diff
Sat, May 18, 2:43 PM
F13210299: D20143.diff
Fri, May 17, 4:42 AM
F13209266: D20143.id48087.diff
Thu, May 16, 10:59 PM
F13194170: D20143.diff
Sun, May 12, 9:22 PM
F13178894: D20143.diff
Wed, May 8, 8:46 PM
F13174330: D20143.id.diff
Tue, May 7, 10:46 PM
Subscribers
None
Tokens
"100" token, awarded by joshuaspence.

Details

Summary

Ref T13250. If you "phlog()" a Throwable, it doesn't recognize that it's an exception and sends you down the "unknown type of object" pathway. You get a one-line "Object Error" message in the log.

Instead, treat it more like an Exception and log a message + stack trace.

Test Plan

Logged some Throwables, got sensible information about them.

Diff Detail

Repository
rPHU libphutil
Branch
throwable5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21926
Build 29940: Run Core Tests
Build 29939: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Feb 11 2019, 11:11 PM

It looks like passing a Throwable as $previous is actually fine everywhere (https://3v4l.org/U2B1v) but it doesn't really matter and I'm sure if we do it they'll break it in PHP 7.4 or something so ¯\_(ツ)_/¯

This revision was automatically updated to reflect the committed changes.