Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/response/AphrontUnhandledExceptionResponse.php
| Show All 18 Lines | return array( | ||||
| 'css/application/config/config-template.css', | 'css/application/config/config-template.css', | ||||
| 'css/application/config/unhandled-exception.css', | 'css/application/config/unhandled-exception.css', | ||||
| ); | ); | ||||
| } | } | ||||
| protected function getResponseTitle() { | protected function getResponseTitle() { | ||||
| $ex = $this->exception; | $ex = $this->exception; | ||||
| if ($ex instanceof AphrontUsageException) { | if ($ex instanceof AphrontMalformedRequestException) { | ||||
| return $ex->getTitle(); | return $ex->getTitle(); | ||||
| } else { | } else { | ||||
| return pht('Unhandled Exception'); | return pht('Unhandled Exception'); | ||||
| } | } | ||||
| } | } | ||||
| protected function getResponseBodyClass() { | protected function getResponseBodyClass() { | ||||
| return 'unhandled-exception'; | return 'unhandled-exception'; | ||||
| } | } | ||||
| protected function getResponseBody() { | protected function getResponseBody() { | ||||
| $ex = $this->exception; | $ex = $this->exception; | ||||
| if ($ex instanceof AphrontUsageException) { | if ($ex instanceof AphrontMalformedRequestException) { | ||||
| $title = $ex->getTitle(); | $title = $ex->getTitle(); | ||||
| } else { | } else { | ||||
| $title = get_class($ex); | $title = get_class($ex); | ||||
| } | } | ||||
| $body = $ex->getMessage(); | $body = $ex->getMessage(); | ||||
| $body = phutil_escape_html_newlines($body); | $body = phutil_escape_html_newlines($body); | ||||
| Show All 31 Lines | |||||