dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c445b5c
)
Don't output skinned errors in case of unhandled API exceptions
author
Max Semenik
<maxsem@users.mediawiki.org>
Mon, 20 Feb 2012 19:19:52 +0000
(19:19 +0000)
committer
Max Semenik
<maxsem@users.mediawiki.org>
Mon, 20 Feb 2012 19:19:52 +0000
(19:19 +0000)
includes/Exception.php
patch
|
blob
|
history
diff --git
a/includes/Exception.php
b/includes/Exception.php
index
3bd89b6
..
e7700b5
100644
(file)
--- a/
includes/Exception.php
+++ b/
includes/Exception.php
@@
-203,7
+203,11
@@
class MWException extends Exception {
wfDebugLog( 'exception', $log );
}
- if ( self::isCommandLine() ) {
+ if ( defined( 'MW_API' ) ) {
+ // Unhandled API exception, we can't be sure that format printer is alive
+ header( 'MediaWiki-API-Error: internal_api_error_' . get_class( $this ) );
+ wfHttpError(500, 'Internal Server Error', $this->getText() );
+ } elseif ( self::isCommandLine() ) {
MWExceptionHandler::printError( $this->getText() );
} else {
$this->reportHTML();