Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Throw RuntimeException in case of errors during BINARY's injection.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosalberto committed Dec 6, 2017
1 parent 5f10075 commit f7dac8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public <C> void inject(MockSpan.MockContext ctx, Format<C> format, C carrier) {
binary.write(ByteBuffer.wrap(stream.toByteArray()));

} catch (IOException e) {
throw new IllegalArgumentException("Corrupted data");
throw new RuntimeException("Corrupted state");
} finally {
if (objStream != null) {
try { objStream.close(); } catch (Exception e2) {}
Expand Down

0 comments on commit f7dac8e

Please sign in to comment.