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
F11781248: D18151.id43672.diff
Sun, May 28, 10:31 AM
Unknown Object (File)
Wed, May 3, 9:46 PM
Unknown Object (File)
Apr 23 2023, 9:58 PM
Unknown Object (File)
Apr 9 2023, 9:15 PM
Unknown Object (File)
Mar 26 2023, 5:12 PM
Unknown Object (File)
Mar 1 2023, 9:11 PM
Unknown Object (File)
Feb 28 2023, 10:46 PM
Unknown Object (File)
Feb 17 2023, 12:44 PM
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