mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
Merge "Show error trace in console when catching an error in bootstrap"
This commit is contained in:
commit
3faa8c5a8b
|
@ -96,7 +96,8 @@
|
||||||
var $dummy = $( '<div class="' + this.readinessCSSClass + '">' )
|
var $dummy = $( '<div class="' + this.readinessCSSClass + '">' )
|
||||||
.appendTo( $( document.body ) ),
|
.appendTo( $( document.body ) ),
|
||||||
bs = this,
|
bs = this,
|
||||||
viewer;
|
viewer,
|
||||||
|
message;
|
||||||
|
|
||||||
if ( $dummy.css( 'display' ) === 'inline' ) {
|
if ( $dummy.css( 'display' ) === 'inline' ) {
|
||||||
// Let's be clean and remove the test item before resolving the deferred
|
// Let's be clean and remove the test item before resolving the deferred
|
||||||
|
@ -104,7 +105,11 @@
|
||||||
try {
|
try {
|
||||||
viewer = bs.getViewer();
|
viewer = bs.getViewer();
|
||||||
} catch ( e ) {
|
} catch ( e ) {
|
||||||
deferred.reject( e.message );
|
message = e.message;
|
||||||
|
if ( e.stack ) {
|
||||||
|
message += '\n' + e.stack;
|
||||||
|
}
|
||||||
|
deferred.reject( message );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
deferred.resolve( viewer );
|
deferred.resolve( viewer );
|
||||||
|
|
Loading…
Reference in a new issue