Changeset 17
- Timestamp:
- Feb 28, 2011, 1:49:07 PM (12 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
r16 r17 30 30 } catch( Exception e ) { 31 31 // Catch all exceptions, show them to the user (by rendering a text message) and print a stacktrace 32 log.error "Exception during full synchronization: " + e.getMessage() 32 def message = e.getMessage(); 33 if( !message || message == 'null' ) 34 message = 'unknown error'; 35 36 // Show errors in log file 37 log.error "Exception during full synchronization: " + message 33 38 e.printStackTrace() 34 39 35 render "An error occurred during synchronization (" + e.class?.name + "): " + e.getMessage(); 40 // Give the user a nice error message 41 response.status = 500; 42 render "An error occurred during synchronization (" + e.class?.name + "): " + message; 36 43 } 37 44 } -
trunk/grails-app/views/synchronize/full.gsp
r16 r17 23 23 success: function(data) { window.location.replace( "${url.encodeAsJavaScript()}" ); }, 24 24 error: function(xhr, textStatus, errorThrown) { 25 if( confirm( "Error " + xhr.responseCode + ": " + xhr.responseText + ". Would you like to try again?" ) ) {26 window.location.re fresh();25 if( confirm( xhr.responseText + ". Please contact the system administrator if the problem persists. Would you like to try again?" ) ) { 26 window.location.reload(true); 27 27 } else { 28 alert( "Redirect to: ${url.encodeAsJavaScript()}" );28 /* 29 29 if( confirm( "Would you like to continue to the original page?") ) { 30 30 window.location.replace( "${url.encodeAsJavaScript()}" ); … … 32 32 $( "#wait_dialog").dialog( "close" ); 33 33 } 34 */ 35 $( "#wait_dialog").dialog( "close" ); 34 36 } 35 37 }
Note: See TracChangeset
for help on using the changeset viewer.