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

public static class CommandFunctionTools.ProcessTerminationException extends RuntimeException
Runtime exception used by terminate_process to signal early termination to the host.
See Also:
  • Constructor Details

    • ProcessTerminationException

      public ProcessTerminationException(String message, int exitCode)
      Creates a termination exception.
      Parameters:
      message - message to expose to the host
      exitCode - desired process exit code
    • ProcessTerminationException

      public ProcessTerminationException(String message, Throwable cause, int exitCode)
      Creates a termination exception.
      Parameters:
      message - message to expose to the host
      cause - underlying cause
      exitCode - desired process exit code
  • Method Details

    • getExitCode

      public int getExitCode()
      Returns the desired exit code.
      Returns:
      exit code