Class SFException

  • All Implemented Interfaces:
    java.io.Serializable

    public class SFException
    extends java.lang.RuntimeException
    Snowflake exception in the Ingest SDK
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SFException​(ErrorCode errorCode, java.lang.String message)
      Construct a Snowflake exception using strongly-typed ErrorCode enum (RECOMMENDED)
      SFException​(ErrorCode errorCode, java.lang.String message, java.lang.Throwable cause)
      Construct a Snowflake exception using strongly-typed ErrorCode enum (RECOMMENDED)
      SFException​(java.lang.String errorCodeName, java.lang.String message, int httpStatusCode, java.lang.String httpStatusName)
      Constructor with explicit error details (FOR FFI USAGE) Use this when you have complete error information including HTTP status code and name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrorCodeName()
      Get the error code name
      int getHttpStatusCode()
      Get the HTTP status code
      java.lang.String getHttpStatusName()
      Get the HTTP status code name
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SFException

        public SFException​(ErrorCode errorCode,
                           java.lang.String message,
                           java.lang.Throwable cause)
        Construct a Snowflake exception using strongly-typed ErrorCode enum (RECOMMENDED)
        Parameters:
        errorCode - the error code enum value
        message - the message of the exception
        cause - the cause of the exception
      • SFException

        public SFException​(ErrorCode errorCode,
                           java.lang.String message)
        Construct a Snowflake exception using strongly-typed ErrorCode enum (RECOMMENDED)
        Parameters:
        errorCode - the error code enum value
        message - the message of the exception
      • SFException

        public SFException​(java.lang.String errorCodeName,
                           java.lang.String message,
                           int httpStatusCode,
                           java.lang.String httpStatusName)
        Constructor with explicit error details (FOR FFI USAGE) Use this when you have complete error information including HTTP status code and name. Prefer ErrorCode enum constructors for new Java code when possible.
        Parameters:
        errorCodeName - the error code name
        message - the message of the exception
        httpStatusCode - the HTTP status code
        httpStatusName - the HTTP status code name
    • Method Detail

      • getErrorCodeName

        public java.lang.String getErrorCodeName()
        Get the error code name
        Returns:
        the error code name (e.g., \"ConfigError\", \"InvalidArgument\")
      • getHttpStatusCode

        public int getHttpStatusCode()
        Get the HTTP status code
        Returns:
        the HTTP status code
      • getHttpStatusName

        public java.lang.String getHttpStatusName()
        Get the HTTP status code name
        Returns:
        the HTTP status code name (e.g., \"Bad Request\", \"Internal Server Error\")