Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.codehaus.groovy.grails.commons.GrailsApplication
- import grails.util.GrailsUtil
- class ErrorController {
- def index() {
- if ( GrailsApplication.ENV_PRODUCTION == GrailsUtil.environment ) {
- // Production: show a nice error message
- render(view:'production')
- } else {
- // Not it production? show an ugly, developer-focused error message
- render(view:'development')
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement