Package org.machanism.machai.ai.tools
Class CommandFunctionTools.ProcessTerminationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.machanism.machai.ai.tools.CommandFunctionTools.ProcessTerminationException
- All Implemented Interfaces:
Serializable
- Enclosing class:
CommandFunctionTools
Runtime exception used by
terminate_process to signal early termination to the host.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProcessTerminationException(String message, int exitCode) Creates a termination exception.ProcessTerminationException(String message, Throwable cause, int exitCode) Creates a termination exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ProcessTerminationException
Creates a termination exception.- Parameters:
message- message to expose to the hostexitCode- desired process exit code
-
ProcessTerminationException
Creates a termination exception.- Parameters:
message- message to expose to the hostcause- underlying causeexitCode- desired process exit code
-
-
Method Details
-
getExitCode
public int getExitCode()Returns the desired exit code.- Returns:
- exit code
-