Skip to content

Commit 4bb9b0b

Browse files
committed
Merge pull request #9 from almozavr/patch-1
Fix DebugNotification#toString if throwable null
2 parents 832ca86 + 4b74ddb commit 4bb9b0b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/rx/plugins/DebugNotification.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public String toString() {
150150
if (kind == Kind.OnNext)
151151
s.append(", \"value\": ").append(quote(value));
152152
if (kind == Kind.OnError)
153-
s.append(", \"exception\": \"").append(throwable.getMessage().replace("\\", "\\\\").replace("\"", "\\\"")).append("\"");
153+
s.append(", \"exception\": \"").append(throwable.getMessage() == null ? throwable.getClass().getSimpleName() : throwable.getMessage().replace("\\", "\\\\").replace("\"", "\\\"")).append("\"");
154154
if (kind == Kind.Request)
155155
s.append(", \"n\": ").append(n);
156156
if (source != null)

0 commit comments

Comments
 (0)