HomePhabricator

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

Description

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

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12855

Differential Revision: https://secure.phabricator.com/D18151

Event Timeline