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
            Assignee: 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 is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
seam-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/seam-issues

Reply via email to