[seam-issues] [JBoss JIRA] (SEAMREST-26) Less verbose configuration of exception mapping rules
Jozef Hartinger (JIRA)
issues at jboss.org
Wed Sep 2 08:16:08 EDT 2015
[ https://issues.jboss.org/browse/SEAMREST-26?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jozef Hartinger reassigned SEAMREST-26:
---------------------------------------
Assignee: (was: Jozef Hartinger)
> Less verbose configuration of exception mapping rules
> -----------------------------------------------------
>
> Key: SEAMREST-26
> URL: https://issues.jboss.org/browse/SEAMREST-26
> Project: Seam REST
> Issue Type: Feature Request
> Components: Configuration, Examples, Exception handling
> Affects Versions: 3.0.0.Beta1
> Reporter: Jozef Hartinger
> Priority: Minor
>
> Currently we have:
> <rest:SeamRestConfiguration preferedTemplatingProvider="org.jboss.seam.rest.templating.freemarker.FreeMarkerProvider">
> <rest:mappings>
> <s:value>
> <exceptions:Mapping exceptionType="javax.persistence.NoResultException" statusCode="404">
> <exceptions:message>Requested resource (#{uriInfo.path}) does not exist.</exceptions:message>
> </exceptions:Mapping>
> </s:value>
> <s:value>
> <exceptions:Mapping exceptionType="java.lang.IllegalArgumentException" statusCode="400" message="Illegal value."/>
> </s:value>
> <s:value>
> <exceptions:Mapping exceptionType="java.lang.IllegalArgumentException" statusCode="400" message="Illegal value."/>
> </s:value>
> </rest:mappings>
> </rest:SeamRestConfiguration>
> we could make it to
> <rest:SeamRestConfiguration preferedTemplatingProvider="org.jboss.seam.rest.templating.freemarker.FreeMarkerProvider">
> <rest:mappings>
> <s:values>
> <exceptions:Mapping exceptionType="javax.persistence.NoResultException" statusCode="404">
> <exceptions:message>Requested resource (#{uriInfo.path}) does not exist.</exceptions:message>
> </exceptions:Mapping>
> <exceptions:Mapping exceptionType="java.lang.IllegalArgumentException" statusCode="400" message="Illegal value."/>
> <exceptions:Mapping exceptionType="java.lang.IllegalArgumentException" statusCode="400" message="Illegal value."/>
> </s:values>
> </rest:mappings>
> </rest:SeamRestConfiguration>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the seam-issues
mailing list