Package org.apache.avro.path
Class TracingNullPointException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.NullPointerException
org.apache.avro.path.TracingNullPointException
- All Implemented Interfaces:
Serializable,PathTracingException<NullPointerException>
public class TracingNullPointException
extends NullPointerException
implements PathTracingException<NullPointerException>
a
NullPointerException with extra fields used to trace back the path
to a null value through an object graph- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTracingNullPointException(NullPointerException cause, Schema expected, boolean customCoderUsed) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()produces a user-facing exception to be thrown back out to user codevoidtracePath(PathElement step) appends a path element to the trace. expected to be called in reverse-order as the exception bubbles up the stackMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TracingNullPointException
public TracingNullPointException(NullPointerException cause, Schema expected, boolean customCoderUsed)
-
-
Method Details
-
tracePath
Description copied from interface:PathTracingExceptionappends a path element to the trace. expected to be called in reverse-order as the exception bubbles up the stack- Specified by:
tracePathin interfacePathTracingException<NullPointerException>- Parameters:
step- an AvroPath step tracing back from the location of the original exception towards the root of the data graph
-
getCause
-
summarize
Description copied from interface:PathTracingExceptionproduces a user-facing exception to be thrown back out to user code- Specified by:
summarizein interfacePathTracingException<NullPointerException>- Parameters:
root- the root object for the operation that generated the exception- Returns:
- a hopefully helpful error message
-