Interface ErrorFactory

All Known Implementing Classes:
JsonLoaderImpl, KafkaJsonLoader

public interface ErrorFactory
To avoid coupling the JSON structure parser with Drill's error reporting mechanism, the caller passes in an instance of this error factory which will build the required errors, including filling in caller-specific context.
  • Method Details

    • parseError

      RuntimeException parseError(String string, com.fasterxml.jackson.core.JsonParseException e)
      The Jackson JSON parser failed to start on the input file.
    • ioException

      RuntimeException ioException(IOException e)
      I/O error reported from the Jackson JSON parser.
    • structureError

      RuntimeException structureError(String string)
      General structure-level error: something very unusual occurred in the JSON that passed Jackson, but failed in the structure parser. =
    • syntaxError

      RuntimeException syntaxError(com.fasterxml.jackson.core.JsonParseException e)
      The Jackson parser reported a syntax error. Will not occur if recovery is enabled.
    • typeError

      The Jackson parser reported an error when trying to convert a value to a specific type. Should never occur since we only convert to the type that Jackson itself identified.
    • syntaxError

      RuntimeException syntaxError(com.fasterxml.jackson.core.JsonToken token)
      Received an unexpected token. Should never occur as the Jackson parser itself catches errors.
    • unrecoverableError

      RuntimeException unrecoverableError()
      Error recovery is on, the structure parser tried to recover, but encountered too many other errors and gave up.
    • messageParseError

      Parser is configured to find a message tag within the JSON and a syntax occurred when following the data path.