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