Throwing JsonIOException on write failures

This commit is contained in:
Inderjeet Singh 2010-10-18 23:58:09 +00:00
parent 18a9205a04
commit 91bee2a688

View File

@ -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);