1. Create a mapping in UrlMappings.groovy:
"500"(controller: 'errors')
2. Create a controller that will handle it:
class ErrorsController {
def index = {
def exception = request.exception
// do some processing here
}
}
It's very unfortunate that the
request.exception
is not mentioned in the right spot in Grails documentation. It leads to confusion that the actual exception instance is available only in views which is clearly not the case.
1 comment:
Good point. Could you raise a documentation JIRA? Even better would be a patch or GitHub pull request.
Thanks,
Peter
Post a Comment