Skip to content

Instantly share code, notes, and snippets.

@luksrn
Created April 29, 2016 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luksrn/4146af12c0a29cea066a9c871dc1ca51 to your computer and use it in GitHub Desktop.
Save luksrn/4146af12c0a29cea066a9c871dc1ca51 to your computer and use it in GitHub Desktop.
package demo
class DemoController {
def someAction() {
// do some work
}
def handleSQLException(SQLException e) {
render 'A SQLException Was Handled'
}
def handleBatchUpdateException(BatchUpdateException e) {
redirect controller: 'logging', action: 'batchProblem'
}
def handleNumberFormatException(NumberFormatException nfe) {
[problemDescription: 'A Number Was Invalid']
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment