Top Description Fields Constructors Methods
org.apache.avro.path

public Class TracingNullPointException

extends NullPointerException
implements PathTracingException<NullPointerException>
Class Inheritance
All Implemented Interfaces
org.apache.avro.path.PathTracingException
Imports
org.apache.avro.Schema, org.apache.avro.util.SchemaUtil, java.util.ArrayList, .List

a NullPointerException with extra fields used to trace back the path to a null value through an object graph

Field Summary

Modifier and TypeField and Description
private final NullPointerException
private final boolean
private final Schema
private final List<PathElement>

Constructor Summary

AccessConstructor and Description
public
TracingNullPointException(NullPointerException cause, Schema expected, boolean customCoderUsed)

Method Summary

Modifier and TypeMethod and Description
public synchronized NullPointerException
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown.
public NullPointerException

Returns:

a hopefully helpful error message
summarize
(Schema
the root object for the operation that generated the exception
root
)

Implements org.apache.avro.path.PathTracingException.summarize.

produces a user-facing exception to be thrown back out to user code
public void
tracePath(PathElement
an AvroPath step tracing back from the location of the original exception towards the root of the data graph
step
)

Implements org.apache.avro.path.PathTracingException.tracePath.

appends a path element to the trace.
Inherited from java.lang.NullPointerException:
fillInStackTracegetMessage

Field Detail

causeback to summary
private final NullPointerException cause

Hides java.lang.Throwable.cause.

customCoderUsedback to summary
private final boolean customCoderUsed
expectedback to summary
private final Schema expected
reversePathback to summary
private final List<PathElement> reversePath

Constructor Detail

TracingNullPointExceptionback to summary
public TracingNullPointException(NullPointerException cause, Schema expected, boolean customCoderUsed)

Method Detail

getCauseback to summary
public synchronized NullPointerException getCause()

Overrides java.lang.Throwable.getCause.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:NullPointerException

the cause of this throwable or null if the cause is nonexistent or unknown.

Annotations
@Override
summarizeback to summary
public NullPointerException summarize(Schema root)

Implements org.apache.avro.path.PathTracingException.summarize.

Doc from org.apache.avro.path.PathTracingException.summarize.

produces a user-facing exception to be thrown back out to user code

Parameters
root:Schema

the root object for the operation that generated the exception

Returns:NullPointerException

a hopefully helpful error message

Annotations
@Override
tracePathback to summary
public void tracePath(PathElement step)

Implements org.apache.avro.path.PathTracingException.tracePath.

Doc from org.apache.avro.path.PathTracingException.tracePath.

appends a path element to the trace. expected to be called in reverse-order as the exception bubbles up the stack

Parameters
step:PathElement

an AvroPath step tracing back from the location of the original exception towards the root of the data graph

Annotations
@Override