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
Base exception for all sandbox operations.
Specialized subclasses are provided as static nested classes for common failure modes:
SandboxException.SandboxConfigurationException, SandboxException.SandboxRuntimeException,
SandboxException.WorkspaceStartException, SandboxException.WorkspaceStopException,
SandboxException.ExecException, SandboxException.ExecTimeoutException, SandboxException.SnapshotException.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThrown when a sandbox command exits with a non-zero exit code.static classThrown when a sandbox command times out.static classThrown when sandbox configuration is invalid or missing (e.g. no client configured).static classThrown for general sandbox runtime failures not covered by a more specific subclass.static classThrown when a snapshot operation (persist or restore) fails.static classThrown when the workspace backend fails to start.static classThrown when the workspace backend fails to stop. -
Constructor Summary
ConstructorsConstructorDescriptionSandboxException(SandboxErrorCode errorCode, String message) Creates a sandbox exception with an error code and message.SandboxException(SandboxErrorCode errorCode, String op, String message, Throwable cause) Creates a sandbox exception with an error code, operation name, message, and cause.SandboxException(SandboxErrorCode errorCode, String message, Throwable cause) Creates a sandbox exception with an error code, message, and cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the error code classifying this failure.getOp()Returns the operation name that failed, ornullif not specified.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SandboxException
Creates a sandbox exception with an error code and message.- Parameters:
errorCode- the error code classifying the failuremessage- human-readable description
-
SandboxException
Creates a sandbox exception with an error code, message, and cause.- Parameters:
errorCode- the error code classifying the failuremessage- human-readable descriptioncause- the underlying cause
-
SandboxException
Creates a sandbox exception with an error code, operation name, message, and cause.- Parameters:
errorCode- the error code classifying the failureop- the operation that failed (e.g. "start", "exec", "persist")message- human-readable descriptioncause- the underlying cause
-
-
Method Details
-
getErrorCode
Returns the error code classifying this failure.- Returns:
- the error code
-
getOp
Returns the operation name that failed, ornullif not specified.- Returns:
- operation name, may be null
-