Page MenuHomePhabricator

Don't warn about use of "Throwable" under PHP5
ClosedPublic

Authored by epriestley on Jun 23 2017, 4:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 8:38 AM
Unknown Object (File)
Mon, May 6, 7:23 PM
Unknown Object (File)
Sat, May 4, 7:00 PM
Unknown Object (File)
Fri, May 3, 8:41 AM
Unknown Object (File)
Mon, Apr 29, 5:46 PM
Unknown Object (File)
Sun, Apr 28, 4:04 AM
Unknown Object (File)
Sat, Apr 27, 1:31 PM
Unknown Object (File)
Thu, Apr 25, 10:56 AM
Subscribers
None

Details

Summary

Ref T12855. Throwable does not exist in PHP5, but can be used safely in this construct, at a minimum:

} catch (Exception $ex) {
} catch (Throwable $ex) {

We could heavily overachive here by trying to make sure that uses of Throwable were all safe, but I suspect we'll end up with about 15 uses and never really have problems with this. Until this is a real problem, just stop the analyzer from complaining about Throwable and Error.

Test Plan
  • Changed Throwable to Throwablez.
  • Ran arc lint.
  • Got a lint error.
  • Added Throwablez to whitelist.
  • (Prodded some caches.)
  • No more lint error.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable