Skip to content

Commit

Permalink
#829 Wrap allocation errors in KryoException when reading and writi…
Browse files Browse the repository at this point in the history
…ng fields
  • Loading branch information
theigl committed May 26, 2021
1 parent 8ba6345 commit adbac89
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -108,7 +108,7 @@ public void write (Kryo kryo, Output output, T object) {
fields[i].write(output, object);
} catch (KryoException e) {
throw e;
} catch (Exception e) {
} catch (Throwable e) {
throw new KryoException("Error writing " + fields[i] + " at position " + output.position(), e);
}
}
Expand All @@ -129,7 +129,7 @@ public T read (Kryo kryo, Input input, Class<? extends T> type) {
fields[i].read(input, object);
} catch (KryoException e) {
throw e;
} catch (Exception e) {
} catch (Throwable e) {
throw new KryoException("Error reading " + fields[i] + " at position " + input.position(), e);
}
}
Expand Down

0 comments on commit adbac89

Please sign in to comment.