org.apache.avro.path

## Class TracingClassCastException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - java.lang.ClassCastException
        - - org.apache.avro.path.TracingClassCastException

All Implemented Interfaces:
  Serializable, PathTracingException<ClassCastException>

    public class TracingClassCastException
    extends ClassCastException
    implements PathTracingException<ClassCastException>

a `ClassCastException` with extra fields used to trace back the path to a bad value through an object graph

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`TracingClassCastException(ClassCastException cause, Object datum, Schema expected, boolean customCoderUsed)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ClassCastException` `getCause()`
`ClassCastException` `summarize(Schema root)` produces a user-facing exception to be thrown back out to user code
`void` `tracePath(PathElement step)` appends a path element to the trace.

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### TracingClassCastException

    public TracingClassCastException(ClassCastException cause,
                                     Object datum,
                                     Schema expected,
                                     boolean customCoderUsed)

### Method Detail

#### tracePath

    public void tracePath(PathElement step)

Description copied from interface: `PathTracingException`
appends a path element to the trace. expected to be called in reverse-order as the exception bubbles up the stack

Specified by:
  `tracePath` in interface `PathTracingException<ClassCastException>`
Parameters:
  `step` - an AvroPath step tracing back from the location of the original exception towards the root of the data graph

#### getCause

    public ClassCastException getCause()

Overrides:
  `getCause` in class `Throwable`

#### summarize

    public ClassCastException summarize(Schema root)

Description copied from interface: `PathTracingException`
produces a user-facing exception to be thrown back out to user code

Specified by:
  `summarize` in interface `PathTracingException<ClassCastException>`
Parameters:
  `root` - the root object for the operation that generated the exception
Returns:
  a hopefully helpful error message