AS AgentScopeAPI 手册 / API Reference

ExecException

public static class ExecException extends SandboxException
源码Source io/agentscope/harness/agent/sandbox/SandboxException.java:221–269

Exec 异常,表示执行过程中的错误。位于 io.agentscope.harness.agent.sandbox 包,继承自 SandboxException。核心成员包括 getExitCode、getStdout、getStderr、ExecException。

Thrown when a sandbox command exits with a non-zero exit code.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ExecException(int exitCode, String stdout, String stderr)
初始化 `ExecException` 实例。
Creates an exec exception.

方法摘要Method Summary

方法Method说明Description
public int getExitCode()
获取 `getExitCode`。
Returns the process exit code.
public String getStdout()
获取 `getStdout`。
Returns captured standard output.
public String getStderr()
获取 `getStderr`。
Returns captured standard error.

构造器详情Constructor Detail

ExecException

public ExecException(int exitCode, String stdout, String stderr)

初始化 ExecException 实例。

Creates an exec exception.

参数Parameters
名称Name类型Type说明Description
exitCodeintexit Code(类型 `int`)。the process exit code
stdoutStringstdout(类型 `String`)。captured standard output
stderrStringstderr(类型 `String`)。captured standard error
源码Source io/agentscope/harness/agent/sandbox/SandboxException.java:234–241

方法详情Method Detail

getExitCode

public int getExitCode()

获取 getExitCode。

Returns the process exit code.

返回Returns int
返回数值结果。exit code
源码Source io/agentscope/harness/agent/sandbox/SandboxException.java:248–250

getStdout

public String getStdout()

获取 getStdout。

Returns captured standard output.

返回Returns String
返回字符串结果。stdout
源码Source io/agentscope/harness/agent/sandbox/SandboxException.java:257–259

getStderr

public String getStderr()

获取 getStderr。

Returns captured standard error.

返回Returns String
返回字符串结果。stderr
源码Source io/agentscope/harness/agent/sandbox/SandboxException.java:266–268

继承成员Inherited Members

继承自Methods inherited from SandboxException
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.