mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-21 03:08:40 +01:00
Show exception title as page title for AphrontUsageException
Summary: Fixes T7273. This shows a better title (like "No Such Instance") instead of a generic one ("Unhandled Exception") when the user hits an AphrontUsageException. Test Plan: Visited a nonexistent instance, got a nice title. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7273 Differential Revision: https://secure.phabricator.com/D11771
This commit is contained in:
parent
a8cc1c05e5
commit
80e399def9
1 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,13 @@ final class AphrontUnhandledExceptionResponse
|
|||
}
|
||||
|
||||
protected function getResponseTitle() {
|
||||
return pht('Unhandled Exception');
|
||||
$ex = $this->exception;
|
||||
|
||||
if ($ex instanceof AphrontUsageException) {
|
||||
return $ex->getTitle();
|
||||
} else {
|
||||
return pht('Unhandled Exception');
|
||||
}
|
||||
}
|
||||
|
||||
protected function getResponseBodyClass() {
|
||||
|
|
Loading…
Add table
Reference in a new issue