Project

General

Profile

1
package eu.dnetlib.repo.manager.exception;
2

    
3
import org.springframework.http.HttpStatus;
4
import org.springframework.web.bind.annotation.ResponseStatus;
5

    
6
@ResponseStatus(HttpStatus.NOT_FOUND)
7
public class ResourceNotFoundException extends Exception {
8
    public ResourceNotFoundException() {
9
        super("Resource Not Found");
10
    }
11

    
12
    public ResourceNotFoundException(String message) {
13
        super(message);
14
    }
15

    
16
    public ResourceNotFoundException(String id, String resourceType) {
17
        super(resourceType + " with id " + id + " was not found");
18
    }
19
}
(2-2/3)