All Known Implementing Classes:
AnalysisException, CatalogNotFoundException, ShuffleStatusNotFoundException, SparkException, StreamingQueryException, UnrecognizedBlockId

@Evolving public interface SparkThrowable

Interface mixed into Throwables thrown from Spark. - For backwards compatibility, existing Throwable types can be thrown with an arbitrary error message with a null error class. See [[SparkException]]. - To promote standardization, Throwables should be thrown with an error class and message parameters to construct an error message with SparkThrowableHelper.getMessage(). New Throwable types should not accept arbitrary error messages. See [[SparkArithmeticException]].

Since:
3.2.0
  • Method Summary

    Succinct, human-readable, unique, and consistent representation of the error condition.

    Returns the default message template for this error.

    ================================================ Server side exceptions should override this method and use a provided SQL state property instead.

    default boolean

  • Method Details

    • getCondition

      Succinct, human-readable, unique, and consistent representation of the error condition. If null, error condition is not set.

    • getErrorClass

      Succinct, human-readable, unique, and consistent representation of the error category. If null, error class is not set.

    • getSqlState

      default String getSqlState()

      ================================================ Server side exceptions should override this method and use a provided SQL state property instead. ================================================

    • isInternalError

      default boolean isInternalError()

    • getBreakingChangeInfo

    • getMessageParameters

    • getDefaultMessageTemplate

      default String getDefaultMessageTemplate()

      Returns the default message template for this error. The template is a machine-readable string with placeholders to be filled by getMessageParameters(). This is the default template known to Spark, but clients are free to generate their own messages (e.g., translations, alternate formats) using the provided error metadata.

      Returns:
      the default message template for this error, or null if unavailable
    • getQueryContext