Skip to content

Commit cc76895

Browse files
messagePrefix null check
1 parent 5ca76e0 commit cc76895

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rxjava-core/src/main/java/rx/exceptions/CompositeException.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ public CompositeException(String messagePrefix, Collection<Throwable> errors) {
4545
_exceptions.add(e);
4646
}
4747
this.exceptions = Collections.unmodifiableList(_exceptions);
48-
this.message = messagePrefix + " " + count + " exceptions occurred. See them in causal chain below.";
48+
49+
String msg = count + " exceptions occurred. See them in causal chain below.";
50+
if(messagePrefix != null) {
51+
msg = messagePrefix + " " + msg;
52+
}
53+
this.message = msg;
4954
this.cause = _cause;
5055
}
5156

0 commit comments

Comments
 (0)