이 콘텐츠는 선택한 언어로 제공되지 않습니다.
13.8. Exception Handling
13.8.1. Create an Exception Mapper 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Summary
Exception mappers are custom, application provided components that catch thrown exceptions and write specific HTTP responses.
Example 13.2. Exception Mapper
An exception mapper is a class that is annotated with the @Provider annotation, and implements the
ExceptionMapper
interface.
An example exception mapper is shown below.
To register an exception mapper, list it in the
web.xml
file under the resteasy.providers
context-param, or register it programmatically through the ResteasyProviderFactory
class.