"""Errors surfaced by the surgery recording / result pipeline.""" from __future__ import annotations from typing import Any class SurgeryPipelineError(Exception): """录制未能按约定完成启动或停止。""" def __init__( self, code: str, message: str, *, extra: dict[str, Any] | None = None, ) -> None: self.code = code self.message = message self.extra = extra super().__init__(message)