title: Generic URLMapping in Grails for all 4xx or 5xx Errors
body: <p>I am using Grails 2.4.4 and would like to define a generic UrlMapping for a range of HTTP-error-codes (like 450-499, 510-540).</p>
  
  <p>I've found some related questions - even on <a href="https://stackoverflow.com/questions/4367594/how-to-globally-handle-http-errors-in-grails-status-codes-4xx-5xx">SO</a> - but the answers are either outdated or not working.</p>
  
  <p>The container does not start once I use regular expressions on error-mappings.</p>
  
  <p>For instance, this simple example will fail:</p>
  
  <pre><code>"$errorCode" {
       controller = "error"
       action = "general"
       constraints {
            errorCode(matches:/\d{3}/)
       }
  }
  </code></pre>
  
  <p>Does anyone know how I may approach this?</p>