Project

General

Profile

« Previous | Next » 

Revision 54525

New project structure

View differences:

GenericControllerAdvice.java
1
package eu.dnetlib.repo.manager.service.controllers;
1
package eu.dnetlib.repo.manager.controllers;
2 2

  
3 3

  
4 4
import eu.dnetlib.api.functionality.ValidatorServiceException;
5
import eu.dnetlib.repo.manager.service.exception.ResourceNotFoundException;
6
import eu.dnetlib.repo.manager.service.exception.ServerError;
5
import eu.dnetlib.repo.manager.exception.EndPointException;
6
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7
import eu.dnetlib.repo.manager.exception.ServerError;
7 8
import eu.dnetlib.repo.manager.shared.BrokerException;
8 9
import org.apache.log4j.LogManager;
9 10
import org.apache.log4j.Logger;
......
53 54
        return new ServerError(req.getRequestURL().toString(),ex);
54 55
    }
55 56

  
57
    @ResponseStatus(HttpStatus.GATEWAY_TIMEOUT)
58
    @ExceptionHandler(EndPointException.class)
59
    @ResponseBody
60
    ServerError endPointException(HttpServletRequest req, Exception ex) {
61
        return new ServerError(req.getRequestURL().toString(),ex);
62
    }
56 63

  
64

  
57 65
}

Also available in: Unified diff