Class ExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ch.turic.ExecutionException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionExecutionException(Exception cause, String message) Creates an exception with a cause and message.ExecutionException(String s, Object... params) Creates an exception with a formatted message.ExecutionException(Throwable throwable) Creates an exception from another throwable.ExecutionException(Throwable throwable, ch.turic.memory.LngException embedded) Creates an exception from a throwable with an embedded LngException.ExecutionException(Throwable t, String s, Object... params) Creates an exception with a cause and formatted message. -
Method Summary
Modifier and TypeMethodDescriptionch.turic.memory.LngExceptionembedded()Returns the embedded LngException if one exists.static voidThrows an ExecutionException with a formatted message when the condition is true.static voidThrows an ExecutionException with a message from a supplier when the condition is true.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExecutionException
-
ExecutionException
-
ExecutionException
-
ExecutionException
Creates an exception from another throwable.- Parameters:
throwable- The underlying throwable
-
ExecutionException
Creates an exception from a throwable with an embedded LngException.- Parameters:
throwable- The underlying throwableembedded- 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
Throws an ExecutionException with a formatted message when the condition is true.- Parameters:
b- The condition to checkmsg- The message format stringparameters- The parameters to format the message- Throws:
ExecutionException- when the condition is true
-
when
Throws an ExecutionException with a message from a supplier when the condition is true.- Parameters:
b- The condition to checkmsg- The message supplier- Throws:
ExecutionException- when the condition is true
-