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
F15525798: D18151.diff
Mon, Apr 21, 4:59 PM
F15525372: D18151.id43673.diff
Mon, Apr 21, 1:55 PM
F15524159: D18151.id43672.diff
Mon, Apr 21, 6:18 AM
F15522268: D18151.id43672.diff
Sun, Apr 20, 7:08 PM
F15516678: D18151.id.diff
Fri, Apr 18, 8:37 PM
F15513762: D18151.diff
Thu, Apr 17, 9:43 PM
F15483422: D18151.diff
Wed, Apr 9, 12:10 PM
F15381014: D18151.id43672.diff
Mar 14 2025, 5:29 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
Branch
throwable1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17560
Build 23564: Run Core Tests
Build 23563: arc lint + arc unit