Changeset 17 for trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
- Timestamp:
- Feb 28, 2011, 1:49:07 PM (13 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.