Skip to content

Commit

Permalink
OF-2611: Add context to StreamError when no message is provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Jul 20, 2023
1 parent b371674 commit 6974911
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public StreamErrorException(StreamError.Condition condition, String message, Thr

public StreamErrorException(StreamError.Condition condition, Throwable cause)
{
super(cause);
super(condition.name(), cause);
this.streamError = new StreamError(condition);
}

Expand All @@ -57,6 +57,7 @@ public StreamErrorException(StreamError.Condition condition, String message, Thr

public StreamErrorException(StreamError streamError)
{
super(streamError != null && !streamError.getText().isEmpty() ? streamError.getText() : null);
this.streamError = streamError;
}

Expand All @@ -74,7 +75,7 @@ public StreamErrorException(StreamError streamError, String message, Throwable c

public StreamErrorException(StreamError streamError, Throwable cause)
{
super(cause);
super(streamError != null && !streamError.getText().isEmpty() ? streamError.getText() : null, cause);
this.streamError = streamError;
}

Expand Down

0 comments on commit 6974911

Please sign in to comment.