1
0
Fork 0
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:
epriestley 2015-02-15 07:39:35 -08:00
parent a8cc1c05e5
commit 80e399def9

View file

@ -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() {