HomePhabricator

Catch Exceptions only for HHVM compatibility

Authored by kostajh on Sep 26 2018, 12:47 AM.

Description

Catch Exceptions only for HHVM compatibility

In Id0f4271d635094bf99f2fc8fa9cbbc4b08f07b46, a change was made to catch
exceptions implementing the Throwable interface. While this works in PHP 7,
it does not work in the version of HHVM used in production. We know this
because as Timo pointed out, the ImportException we see exists in the
'exception' log, which means it was a fatal, and not caught. This can also be
verified using the 'hhvm' role in MW Vagrant.

Throwable was added as a means to prevent the error noted in T184670#3909577
but it appears that the root of the "unable to opt-out of Flow user talk pages
in some circumstances" bug occurs elsewhere in the stack.

This change switches back to catching the Exception class, which is verified
to work in mw-vagrant using the 'hhvm' role.

Bug: T70526
Change-Id: I41bd3800f6fc7efbf07662b2a7a22891ffd6f2b8