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
F19508786: D18151.id43673.diff
Sat, Jan 10, 10:27 AM
F19507863: D18151.diff
Fri, Jan 9, 11:52 PM
F19064428: D18151.id.diff
Nov 29 2025, 9:26 PM
F19057103: D18151.diff
Nov 28 2025, 9:18 PM
F18832330: D18151.id.diff
Oct 25 2025, 9:19 PM
F18829400: D18151.diff
Oct 24 2025, 9:43 PM
F18805018: D18151.id43673.diff
Oct 18 2025, 1:11 PM
F18773529: D18151.id43673.diff
Oct 9 2025, 10:32 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