Projekt

Obecné

Profil

Stáhnout (625 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
package cz.zcu.kiv.backendapi.exception;
2

    
3
import lombok.Getter;
4
import org.springframework.http.HttpStatus;
5

    
6
/**
7
 * Class representing custom API request exception
8
 */
9
@Getter
10
public class ApiRequestException extends RuntimeException {
11
    /**
12
     * HTTP status
13
     */
14
    private final HttpStatus httpStatus;
15

    
16
    /**
17
     * Creates new API request exception with given message and HTTP status
18
     *
19
     * @param message    message
20
     * @param httpStatus HTTP status
21
     */
22
    public ApiRequestException(String message, HttpStatus httpStatus) {
23
        super(message);
24
        this.httpStatus = httpStatus;
25
    }
26

    
27
}
(2-2/2)