Revize 217cf731
Přidáno uživatelem Jakub Šmíd před asi 2 roky(ů)
backend/src/main/java/cz/zcu/kiv/backendapi/exception/ApiRequestException.java | ||
---|---|---|
3 | 3 |
import lombok.Getter; |
4 | 4 |
import org.springframework.http.HttpStatus; |
5 | 5 |
|
6 |
/** |
|
7 |
* Class representing custom API request exception |
|
8 |
*/ |
|
6 | 9 |
@Getter |
7 | 10 |
public class ApiRequestException extends RuntimeException { |
11 |
/** |
|
12 |
* HTTP status |
|
13 |
*/ |
|
8 | 14 |
private final HttpStatus httpStatus; |
9 | 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 |
*/ |
|
10 | 22 |
public ApiRequestException(String message, HttpStatus httpStatus) { |
11 | 23 |
super(message); |
12 | 24 |
this.httpStatus = httpStatus; |
Také k dispozici: Unified diff
Added missing comments, code refactoring
re #9743