Improved error message.

This commit is contained in:
Martin Edenhofer 2012-10-31 08:56:13 +01:00
parent a584f17b51
commit b0f22af880

View file

@ -33,9 +33,13 @@ class _Singleton
# show error messages # show error messages
$('body').bind( 'ajaxError', ( e, jqxhr, settings, exception ) -> $('body').bind( 'ajaxError', ( e, jqxhr, settings, exception ) ->
status = jqxhr.status
detail = jqxhr.responseText
if !status && !detail
detail = 'General communication error, maybe internet is not available!'
new App.ErrorModal( new App.ErrorModal(
message: 'StatusCode: ' + jqxhr.status message: 'StatusCode: ' + status
detail: jqxhr.responseText detail: detail
close: true close: true
) )
) )