grails-app/controllers/demo/DemoController.groovy

    That controller will behave as if it were written something like this…​

    The exception handler method names can be any valid method name. The name is not what makes the method an exception handler, the argument type is the important part.

    The exception handler methods can do anything that a controller action can do including invoking , , returning a model, etc.

    src/main/groovy/com/demo/DatabaseExceptionHandler.groovy

    grails-app/controllers/com/demo/DemoController.groovy