Skip to content
Snippets Groups Projects
Commit 53ed0b17 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Implemented import of portal files to DataNodes

parent abff3233
No related branches found
No related tags found
No related merge requests found
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package it.inaf.oats.vospace.exception; package it.inaf.oats.vospace.exception;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) // Status code 500 @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR) // Status code 500
public class InternalFaultException extends VoSpaceException { public class InternalFaultException extends VoSpaceException {
private static final Logger LOG = LoggerFactory.getLogger(InternalFaultException.class);
public InternalFaultException(String msg) { public InternalFaultException(String msg) {
super("InternalFaultException: " + msg); super("InternalFaultException: " + msg);
} }
public InternalFaultException(Throwable cause) {
super("InternalFaultException: " + getMessage(cause));
}
private static String getMessage(Throwable cause) {
LOG.error("Exception caught", cause);
return cause.getMessage() != null ? cause.getMessage() : cause.getClass().getCanonicalName();
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment