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)
Feb 14 2024, 12:36 PM
Unknown Object (File)
Feb 12 2024, 4:11 AM
Unknown Object (File)
Jan 27 2024, 6:27 PM
Unknown Object (File)
Jan 6 2024, 7:40 PM
Unknown Object (File)
Dec 27 2023, 11:32 AM
Unknown Object (File)
Dec 24 2023, 2:57 AM
Unknown Object (File)
Dec 21 2023, 7:49 PM
Unknown Object (File)
Dec 18 2023, 11:26 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