Class SandboxException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.agentscope.harness.agent.sandbox.SandboxException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SandboxException.ExecException, SandboxException.ExecTimeoutException, SandboxException.SandboxConfigurationException, SandboxException.SandboxRuntimeException, SandboxException.SnapshotException, SandboxException.WorkspaceStartException, SandboxException.WorkspaceStopException

public class SandboxException extends RuntimeException
See Also:
  • Constructor Details

    • SandboxException

      public SandboxException(SandboxErrorCode errorCode, String message)
      Creates a sandbox exception with an error code and message.
      Parameters:
      errorCode - the error code classifying the failure
      message - human-readable description
    • SandboxException

      public SandboxException(SandboxErrorCode errorCode, String message, Throwable cause)
      Creates a sandbox exception with an error code, message, and cause.
      Parameters:
      errorCode - the error code classifying the failure
      message - human-readable description
      cause - the underlying cause
    • SandboxException

      public SandboxException(SandboxErrorCode errorCode, String op, String message, Throwable cause)
      Creates a sandbox exception with an error code, operation name, message, and cause.
      Parameters:
      errorCode - the error code classifying the failure
      op - the operation that failed (e.g. "start", "exec", "persist")
      message - human-readable description
      cause - the underlying cause
  • Method Details

    • getErrorCode

      public SandboxErrorCode getErrorCode()
      Returns the error code classifying this failure.
      Returns:
      the error code
    • getOp

      public String getOp()
      Returns the operation name that failed, or null if not specified.
      Returns:
      operation name, may be null