Skip to content

Commit d0b0260

Browse files
committed
add object args to ClientRuntimeException
1 parent a47db7e commit d0b0260

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/it/aboutbits/springboot/toolbox/exception/ClientRuntimeException.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,46 @@
44

55
@NullMarked
66
public class ClientRuntimeException extends RuntimeException {
7+
8+
private final Object[] args;
9+
710
public ClientRuntimeException() {
11+
this.args = new Object[0];
812
}
913

1014
public ClientRuntimeException(ExceptionMessageDefinition message) {
1115
super(message.code());
16+
this.args = new Object[0];
17+
}
18+
19+
public ClientRuntimeException(ExceptionMessageDefinition message, Object... args) {
20+
super(message.code());
21+
this.args = args;
1222
}
1323

1424
public ClientRuntimeException(String message) {
1525
super(message);
26+
this.args = new Object[0];
27+
}
28+
29+
public ClientRuntimeException(String message, Object... args) {
30+
super(message);
31+
this.args = args;
1632
}
1733

1834
public ClientRuntimeException(ExceptionMessageDefinition message, Throwable cause) {
1935
super(message.code(), cause);
36+
this.args = new Object[0];
2037
}
2138

2239
public ClientRuntimeException(String message, Throwable cause) {
2340
super(message, cause);
41+
this.args = new Object[0];
2442
}
2543

2644
public ClientRuntimeException(Throwable cause) {
2745
super(cause);
46+
this.args = new Object[0];
2847
}
2948

3049
public ClientRuntimeException(
@@ -34,6 +53,7 @@ public ClientRuntimeException(
3453
boolean writableStackTrace
3554
) {
3655
super(message.code(), cause, enableSuppression, writableStackTrace);
56+
this.args = new Object[0];
3757
}
3858

3959
public ClientRuntimeException(
@@ -43,5 +63,6 @@ public ClientRuntimeException(
4363
boolean writableStackTrace
4464
) {
4565
super(message, cause, enableSuppression, writableStackTrace);
66+
this.args = new Object[0];
4667
}
4768
}

0 commit comments

Comments
 (0)