Skip to content

Commit

Permalink
Fix: faulted StorageInputStream hides error cause (Azure#28638)
Browse files Browse the repository at this point in the history
The method checkStreamState() for faulty stream hides the error cause as only the error message is given to the new RuntimeException.
  • Loading branch information
MartinTunzer-TomTom authored May 4, 2022
1 parent ff7cc06 commit 783eaa5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public synchronized int available() {
*/
private synchronized void checkStreamState() {
if (this.streamFaulted) {
throw LOGGER.logExceptionAsError(new RuntimeException(this.lastError.getMessage()));
throw LOGGER.logExceptionAsError(new RuntimeException(this.lastError.getMessage(), this.lastError));
}
}

Expand Down

0 comments on commit 783eaa5

Please sign in to comment.