Class ExecutionException

All Implemented Interfaces:
Serializable

public class ExecutionException extends RuntimeException
Runtime exception class for execution-related errors in the Turi language. This class provides various constructors for different error scenarios and supports embedding of LngException objects for additional context.
See Also:
  • Constructor Details

    • ExecutionException

      public ExecutionException(Exception cause, String message)
      Creates an exception with a cause and message.
      Parameters:
      cause - The underlying exception
      message - The error message
    • ExecutionException

      public ExecutionException(String s, Object... params)
      Creates an exception with a formatted message.
      Parameters:
      s - The message format string
      params - The parameters to format the message
    • ExecutionException

      public ExecutionException(Throwable t, String s, Object... params)
      Creates an exception with a cause and formatted message.
      Parameters:
      t - The underlying throwable
      s - The message format string
      params - The parameters to format the message
    • ExecutionException

      public ExecutionException(Throwable throwable)
      Creates an exception from another throwable.
      Parameters:
      throwable - The underlying throwable
    • ExecutionException

      public ExecutionException(Throwable throwable, ch.turic.memory.LngException embedded)
      Creates an exception from a throwable with an embedded LngException.
      Parameters:
      throwable - The underlying throwable
      embedded - The embedded LngException
  • Method Details

    • embedded

      public ch.turic.memory.LngException embedded()
      Returns the embedded LngException if one exists.
      Returns:
      The embedded LngException object or null if none exists
    • when

      public static void when(boolean b, String msg, Object... parameters) throws ExecutionException
      Throws an ExecutionException with a formatted message when the condition is true.
      Parameters:
      b - The condition to check
      msg - The message format string
      parameters - The parameters to format the message
      Throws:
      ExecutionException - when the condition is true
    • when

      public static void when(boolean b, Supplier<String> msg) throws ExecutionException
      Throws an ExecutionException with a message from a supplier when the condition is true.
      Parameters:
      b - The condition to check
      msg - The message supplier
      Throws:
      ExecutionException - when the condition is true