Throwing JsonIOException on write failures
This commit is contained in:
parent
18a9205a04
commit
91bee2a688
@ -366,7 +366,7 @@ public final class Gson {
|
||||
try {
|
||||
Streams.write(jsonElement, serializeNulls, writer);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new JsonIOException(e);
|
||||
} finally {
|
||||
writer.setLenient(oldLenient);
|
||||
writer.setHtmlSafe(oldHtmlSafe);
|
||||
|
Loading…
Reference in New Issue
Block a user