Page MenuHomePhabricator

Let "phlog()" log Throwables
ClosedPublic

Authored by epriestley on Feb 11 2019, 9:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 21, 3:21 PM
Unknown Object (File)
Tue, Jan 21, 11:57 AM
Unknown Object (File)
Fri, Jan 17, 4:25 PM
Unknown Object (File)
Sun, Jan 12, 11:50 PM
Unknown Object (File)
Sun, Jan 12, 7:47 PM
Unknown Object (File)
Tue, Dec 31, 7:42 AM
Unknown Object (File)
Dec 9 2024, 7:58 AM
Unknown Object (File)
Dec 5 2024, 7:07 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.