Class StatementErrors

java.lang.Object
dev.frostlake.executor.StatementErrors

public final class StatementErrors extends Object
Letting a statement's failure out with the message it already has.

Snowflake reports what went wrong and nothing else — DROP VIEW nosuch answers exactly SQL compilation error:\nView '…' does not exist or not authorized. with no preamble naming the statement. Frostlake used to add one at every layer it passed through, and because several layers wrap, the same phrase appeared more than once: a missing table in a query came back as Failed to execute SQL: Failed to execute SELECT: Failed to execute SELECT: Table does not exist: T. None of that is in the real message, and the repetition was not even intentional.

So a handler that has nothing to add re-throws instead of re-describing. Wrappers that name a specific object — which table function, which Java or Scala routine — are NOT this: they say something the inner message does not, and they stay.

  • Method Details

    • propagate

      public static RuntimeException propagate(Exception cause)
      The failure to re-throw, unchanged where it already is unchecked. Written as throw StatementErrors.propagate(e); so the compiler still sees the method exit.