Select Git revision
DebugMapper.java
Forked from
Yvan Peter / rest-tutoriel
13 commits behind the upstream repository.
-
Yvan Peter authoredYvan Peter authored
DebugMapper.java 479 B
package fr.ulille.iut.tva;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
public class DebugMapper implements ExceptionMapper<Throwable> {
public DebugMapper() {
System.out.println("###### Attention !! DebugMapper est actif !!!");
}
@Override
public Response toResponse(Throwable ex) {
ex.printStackTrace();
return Response.serverError()
.entity(ex.getMessage())
.build();
}
}