All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.swarm.jaxrs.CustomExceptionMapper Maven / Gradle / Ivy

There is a newer version: 2017.5.0
Show newest version
package org.wildfly.swarm.jaxrs;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;

/**
 * @author Bob McWhirter
 */
@Provider
public class CustomExceptionMapper implements ExceptionMapper {

    @Override
    public Response toResponse(CustomException e) {
        return Response.ok( "mapped custom: " + e.getMessage() ).build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy