@@ -0,0 +1,928 @@
+package ru.fitgraph.rest.exceptions;%0Aimport org.apache.log4j.Logger;%0Aimport ru.fitgraph.rest.elements.ErrorResponse;%0A%0Aimport javax.ws.rs.core.Response;%0Aimport javax.ws.rs.ext.ExceptionMapper;%0Aimport javax.ws.rs.ext.Provider;%0A%0A/**%0A * Mapper for catch all internal exceptions. All uncatched exception will be processed by this%0A * class.%0A *%0A * @author Morgen Matvey%0A */%0A@Provider%0Apublic class InternalExceptionMapper implements ExceptionMapper%3CThrowable%3E %7B%0A%0A    private final static Logger logger = Logger.getLogger(InternalExceptionMapper.class);%0A%0A    @Override%0A    public Response toResponse(Throwable exception) %7B%0A        logger.error(%22There are unresolved exception!%22, exception);%0A        ErrorResponse response =%0A                new ErrorResponse(%22InternalServerErrorException%22, %22Internal problem on server, try later.%22);%0A        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(response).build();%0A    %7D%0A%7D%0A

Add mapper for internal server exceptions.