Show error trace in console when catching an error in bootstrap

Change-Id: Icaee88ee3d1d3076cef166ba4443ac9065863efb
This commit is contained in:
Gergő Tisza 2014-04-21 21:23:28 +00:00
parent 5d7e4f8198
commit acd816a4c3

View file

@ -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 );