@Test public void testMessageOffsetCause() { final Exception cause = new NullPointerException(); final DecodeException e = new DecodeException(message, reader, cause); assertTrue(e.getMessage().startsWith(message)); assertEquals(offset, e.getErrorOffset()); assertEquals(cause, e.getCause()); }
private static int getErrorOffset(final JsonReader reader) { return reader != null ? reader.getPosition() - 1 : -1; }
DecodeException extends ParseException { private static int getErrorOffset(final JsonReader reader) { return reader != null ? reader.getPosition() - 1 : -1; } }
DecodeException extends ParseException { private static int getErrorOffset(final JsonReader reader) { return reader != null ? reader.getPosition() - 1 : -1; } DecodeException(final Error error);  DecodeException(final String message, final JsonReader reader);  DecodeException(final String message, final JsonReader reader, final Throwable cause); }
DecodeException extends ParseException { private static int getErrorOffset(final JsonReader reader) { return reader != null ? reader.getPosition() - 1 : -1; } DecodeException(final Error error);  DecodeException(final String message, final JsonReader reader);  DecodeException(final String message, final JsonReader reader, final Throwable cause); JsonReader getReader(); String getContent(); }
DecodeException extends ParseException { private static int getErrorOffset(final JsonReader reader) { return reader != null ? reader.getPosition() - 1 : -1; } DecodeException(final Error error);  DecodeException(final String message, final JsonReader reader);  DecodeException(final String message, final JsonReader reader, final Throwable cause); JsonReader getReader(); String getContent();  }