| @@ 138-148 (lines=11) @@ | ||
| 135 | * |
|
| 136 | * @return string |
|
| 137 | */ |
|
| 138 | public function getText() { |
|
| 139 | global $wgShowExceptionDetails; |
|
| 140 | ||
| 141 | if ( $wgShowExceptionDetails ) { |
|
| 142 | return MWExceptionHandler::getLogMessage( $this ) . |
|
| 143 | "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $this ) . "\n"; |
|
| 144 | } else { |
|
| 145 | return "Set \$wgShowExceptionDetails = true; " . |
|
| 146 | "in LocalSettings.php to show detailed debugging information.\n"; |
|
| 147 | } |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * Return the title of the page when reporting this error in a HTTP response. |
|
| @@ 259-268 (lines=10) @@ | ||
| 256 | * @param Exception|Throwable $e |
|
| 257 | * @return string |
|
| 258 | */ |
|
| 259 | private static function getText( $e ) { |
|
| 260 | if ( self::showBackTrace( $e ) ) { |
|
| 261 | return MWExceptionHandler::getLogMessage( $e ) . |
|
| 262 | "\nBacktrace:\n" . |
|
| 263 | MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n"; |
|
| 264 | } else { |
|
| 265 | return "Set \$wgShowExceptionDetails = true; " . |
|
| 266 | "in LocalSettings.php to show detailed debugging information.\n"; |
|
| 267 | } |
|
| 268 | } |
|
| 269 | ||
| 270 | /** |
|
| 271 | * @param Exception|Throwable $e |
|