AS AgentScopeAPI 手册 / API Reference

FormatterException

public class FormatterException extends RuntimeException
源码Source io/agentscope/core/formatter/FormatterException.java:24–44

格式化器异常,表示执行过程中的错误。位于 io.agentscope.core.formatter 包,继承自 RuntimeException。核心成员包括 FormatterException。

Exception thrown when formatter encounters an error during message formatting or response parsing.

This exception is used to wrap underlying errors (JSON parsing, SDK errors, etc.) and provide consistent error handling across all formatter implementations.

构造器摘要Constructor Summary

构造器Constructor说明Description
public FormatterException(String message)
初始化 `FormatterException` 实例。
Constructs a new FormatterException with the specified detail message.
public FormatterException(String message, Throwable cause)
初始化 `FormatterException` 实例。
Constructs a new FormatterException with the specified detail message and cause.

构造器详情Constructor Detail

FormatterException

public FormatterException(String message)

初始化 FormatterException 实例。

Constructs a new FormatterException with the specified detail message.

参数Parameters
名称Name类型Type说明Description
messageString详情消息。The detail message
源码Source io/agentscope/core/formatter/FormatterException.java:31–33

FormatterException

public FormatterException(String message, Throwable cause)

初始化 FormatterException 实例。

Constructs a new FormatterException with the specified detail message and cause.

参数Parameters
名称Name类型Type说明Description
messageString详情消息。The detail message
causeThrowablecause(类型 `Throwable`)。The cause of the exception
源码Source io/agentscope/core/formatter/FormatterException.java:41–43
基于官方固定版本源码静态生成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.