1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.bremersee.minio;
18
19 import java.io.Serial;
20 import lombok.EqualsAndHashCode;
21 import org.bremersee.exception.AbstractServiceExceptionBuilder;
22 import org.bremersee.exception.ErrorCodeAware;
23 import org.bremersee.exception.HttpStatusAware;
24 import org.bremersee.exception.ServiceException;
25 import org.bremersee.exception.ServiceExceptionBuilder;
26
27
28
29
30
31
32 @EqualsAndHashCode(callSuper = true)
33 public class MinioException extends ServiceException implements HttpStatusAware, ErrorCodeAware {
34
35 @Serial
36 private static final long serialVersionUID = 1L;
37
38
39
40
41
42
43
44
45
46 protected MinioException(
47 final int httpStatus,
48 final String errorCode,
49 final String reason,
50 final Throwable cause) {
51 super(httpStatus, errorCode, reason, cause);
52 }
53
54
55
56
57
58
59 public static ServiceExceptionBuilder<? extends MinioException> builder() {
60
61 return new AbstractServiceExceptionBuilder<>() {
62
63 @Serial
64 private static final long serialVersionUID = 2L;
65
66 @Override
67 protected MinioException buildWith(
68 int httpStatus,
69 String errorCode,
70 String reason,
71 Throwable cause) {
72 return new MinioException(httpStatus, errorCode, reason, cause);
73 }
74 };
75 }
76
77 }