File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
operator-framework-core/src/main/java/io/javaoperatorsdk/operator Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
import java .util .List ;
6
6
7
7
public class AggregatedOperatorException extends OperatorException {
8
+
8
9
private final List <Exception > causes ;
9
10
10
11
public AggregatedOperatorException (String message , Exception ... exceptions ) {
11
- super (message );
12
+ super (message , exceptions != null && exceptions . length > 0 ? exceptions [ 0 ] : null );
12
13
this .causes = exceptions != null ? Arrays .asList (exceptions ) : Collections .emptyList ();
13
14
}
14
15
15
16
public AggregatedOperatorException (String message , List <Exception > exceptions ) {
16
- super (message );
17
+ super (message , exceptions != null && ! exceptions . isEmpty () ? exceptions . get ( 0 ) : null );
17
18
this .causes = exceptions != null ? exceptions : Collections .emptyList ();
18
19
}
19
20
20
21
public List <Exception > getAggregatedExceptions () {
21
22
return causes ;
22
23
}
24
+
25
+ @ Override
26
+ public String toString () {
27
+ return "AggregatedOperatorException{" +
28
+ "causes=" + causes +
29
+ '}' ;
30
+ }
23
31
}
You can’t perform that action at this time.
0 commit comments