Merge "Show error trace in console when catching an error in bootstrap"

This commit is contained in:
jenkins-bot 2014-04-22 07:43:08 +00:00 committed by Gerrit Code Review
commit 3faa8c5a8b

View file

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