use of grails.web.mapping.UrlMappingInfo in project grails-core by grails.
the class DefaultUrlMappingsHolder method matchStatusCode.
public UrlMappingInfo matchStatusCode(int responseCode, Throwable e) {
for (UrlMapping mapping : mappings) {
if (mapping instanceof ResponseCodeUrlMapping) {
ResponseCodeUrlMapping responseCodeUrlMapping = (ResponseCodeUrlMapping) mapping;
final UrlMappingInfo current = responseCodeUrlMapping.match(responseCode);
if (current != null) {
if (responseCodeUrlMapping.getExceptionType() != null && responseCodeUrlMapping.getExceptionType().isInstance(e)) {
return current;
}
}
}
}
return null;
}
Aggregations