Class FlowException

All Implemented Interfaces:
OpenExceptionMeta, Serializable
Direct Known Subclasses:
ConcurrentFlowModificationException, DslParseException, FlowDefinitionException, FlowInstanceNotFoundException, IllegalActionException, TaskNotFoundException

public class FlowException extends OpenException
Base exception for the opencode-base-flow module. opencode-base-flow 模块的异常基类。

All flow-related exceptions extend this class. Carries a stable errorCode (see FlowErrorCode) that callers may switch on programmatically; the human-readable message is intended for logs and operator diagnostics.

所有流程相关异常均继承本类。携带稳定的 errorCode (见 FlowErrorCode),调用方可基于其做编程式分支;人类可读的 message 仅用于日志与运维诊断。

Inherits from OpenException which itself extends RuntimeException - all flow exceptions are unchecked.

继承自 OpenException,其本身继承 RuntimeException —— 所有流程异常都是非受检异常。

Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
See Also:
  • Constructor Details

    • FlowException

      public FlowException(String errorCode, String message)
      Creates a new flow exception. 创建流程异常。
      Parameters:
      errorCode - stable error code (see FlowErrorCode) | 稳定错误码(见 FlowErrorCode)
      message - human-readable detail message | 人类可读的详细消息
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • FlowException

      public FlowException(String errorCode, String message, Throwable cause)
      Creates a new flow exception with a root cause. 创建带原始异常的流程异常。
      Parameters:
      errorCode - stable error code (see FlowErrorCode) | 稳定错误码(见 FlowErrorCode)
      message - human-readable detail message | 人类可读的详细消息
      cause - underlying cause | 原始异常
      Since:
      JDK 25, opencode-base-flow V1.0.5
  • Method Details

    • getErrorCode

      public String getErrorCode()
      Returns the stable error code attached to this exception. 返回本异常携带的稳定错误码。
      Specified by:
      getErrorCode in interface OpenExceptionMeta
      Overrides:
      getErrorCode in class OpenException
      Returns:
      the error code, never null for exceptions constructed via the public constructors of this class | 错误码;通过本类公开构造器创建的实例不会为 null
      Since:
      JDK 25, opencode-base-flow V1.0.5