Files
mkdocs/doc/meshkernelpy/api/meshkernel.errors.md
T
2026-10-10 21:56:35 +08:00

2.3 KiB
Raw Blame History

异常类型

模块:meshkernel.errors。本页依据本地 MeshKernelPy 8.3.0 源码生成,包含该模块定义的类、方法、函数和常量。签名及参数默认值以源码为准;原文未提供的说明会明确标记。

返回 API 总览

Error

继承:Exception。

本模块中所有异常的基类。

InputError

继承:Error。

输入发生错误时抛出的异常。

MeshKernelError

继承:Error。

MeshKernel 库发生错误时抛出的异常。

方法索引

MeshKernelError.__init__

__init__(self, category: str, message: str)

构造实例。源码没有单独编写此构造函数的文档字符串,参数及默认值如下。

参数

名称 类型 默认值 中文说明
category str 必填 源码未单独提供参数说明。
message str 必填 源码未单独提供参数说明。

MeshGeometryError

继承:MeshKernelError。

MeshKernel 库发生网格几何错误时抛出的异常。

方法索引

MeshGeometryError.__init__

__init__(self, message: str, info: Tuple[int, mps.Mesh2dLocation])

构造实例。源码没有单独编写此构造函数的文档字符串,参数及默认值如下。

参数

名称 类型 默认值 中文说明
message str 必填 源码未单独提供参数说明。
info Tuple[int, mps.Mesh2dLocation] 必填 源码未单独提供参数说明。

MeshGeometryError.index

index(self) -> int

返回几何错误信息中的索引 info[0]。

返回类型:int。源码未单独说明返回值。

MeshGeometryError.location

location(self) -> mps.Mesh2dLocation

返回几何错误信息中的位置类型 info[1]。

返回类型:mps.Mesh2dLocation。源码未单独说明返回值。