Changeset View
Changeset View
Standalone View
Standalone View
src/moduleutils/PhutilBootloader.php
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | private function executeInclude($path) { | ||||
// cause PHP to fatal immediately with E_COMPILE_ERROR. Treat these like | // cause PHP to fatal immediately with E_COMPILE_ERROR. Treat these like | ||||
// the similar errors which raise E_ERROR. | // the similar errors which raise E_ERROR. | ||||
// See also T12190. | // See also T12190. | ||||
$old_last = error_get_last(); | $old_last = error_get_last(); | ||||
try { | try { | ||||
$old = error_reporting(E_ERROR | E_COMPILE_ERROR); | // $old = error_reporting(E_ERROR | E_COMPILE_ERROR); | ||||
$okay = include_once $path; | $okay = include_once $path; | ||||
error_reporting($old); | // error_reporting($old); | ||||
epriestley: For debugging a weird thing, I reverted this locally. | |||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
throw $ex; | throw $ex; | ||||
} catch (ParseError $throwable) { | } catch (ParseError $throwable) { | ||||
// NOTE: As of PHP7, syntax errors may raise a ParseError (which is a | // NOTE: As of PHP7, syntax errors may raise a ParseError (which is a | ||||
// Throwable, not an Exception) with a useless message (like "syntax | // Throwable, not an Exception) with a useless message (like "syntax | ||||
// error, unexpected ':'") and a trace which ends a level above this. | // error, unexpected ':'") and a trace which ends a level above this. | ||||
// Treating this object normally results in an unusable message which | // Treating this object normally results in an unusable message which | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |
For debugging a weird thing, I reverted this locally.