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:
129911d
)
ResourceLoader: Fail less hard when JSON serialization of config fails
author
Roan Kattouw
<roan.kattouw@gmail.com>
Wed, 7 Nov 2018 23:04:50 +0000
(15:04 -0800)
committer
Roan Kattouw
<roan.kattouw@gmail.com>
Wed, 7 Nov 2018 23:04:50 +0000
(15:04 -0800)
Instead of throwing an exception on the PHP side, log an error on the JS
side.
Change-Id: I673f59d936e48072e78f6b061ac06f37274ded77
includes/resourceloader/ResourceLoader.php
patch
|
blob
|
history
diff --git
a/includes/resourceloader/ResourceLoader.php
b/includes/resourceloader/ResourceLoader.php
index
2fc81e3
..
9570e03
100644
(file)
--- a/
includes/resourceloader/ResourceLoader.php
+++ b/
includes/resourceloader/ResourceLoader.php
@@
-1529,10
+1529,12
@@
MESSAGE;
self::inDebugMode()
);
if ( $js === false ) {
-
throw
new Exception(
+
$e =
new Exception(
'JSON serialization of config data failed. ' .
'This usually means the config data is not valid UTF-8.'
);
+ MWExceptionHandler::logException( $e );
+ $js = Xml::encodeJsCall( 'mw.log.error', [ $e->__toString() ] );
}
return $js;
}