Provide missing default attachment list for Files transactions
[phabricator.git] / src / aphront / handler / AphrontRequestExceptionHandler.php
blobe626f53cc631174a55d9389571961d9b21444971
1 <?php
3 /**
4 * React to an unhandled exception escaping request handling in a controller
5 * and convert it into a response.
7 * These handlers are generally used to render error pages, but they may
8 * also perform more specialized handling in situations where an error page
9 * is not appropriate.
11 abstract class AphrontRequestExceptionHandler extends Phobject {
13 abstract public function getRequestExceptionHandlerPriority();
15 abstract public function canHandleRequestThrowable(
16 AphrontRequest $request,
17 $throwable);
19 abstract public function handleRequestThrowable(
20 AphrontRequest $request,
21 $throwable);
23 final public static function getAllHandlers() {
24 return id(new PhutilClassMapQuery())
25 ->setAncestorClass(__CLASS__)
26 ->setSortMethod('getRequestExceptionHandlerPriority')
27 ->execute();