API / CLASS REFERENCE
UltralightError
继承: RefCounted
保存脚本、加载、转换和生命周期错误的结构化信息。
失败时通过 error 读取。来源位置和堆栈只在底层提供时填充;有效的 JS null 是成功结果,与错误不同。错误信息不依赖原文档继续存活。
属性
方法
get_code() → String constget_message() → String constget_stack() → String constget_source_url() → String constget_line() → int constget_column() → int const
codeString
错误类别,例如 ScriptException、TypeMismatch、Unsupported、TraversalLimit、PageGone、Cancelled 或 Timeout。
默认值: — · 访问器: get_code() · 只读
messageString
供阅读的错误说明。
默认值: — · 访问器: get_message() · 只读
stackString
可获得的 JS 堆栈;没有时为空字符串。
默认值: — · 访问器: get_stack() · 只读
source_urlString
可获得的脚本来源 URL;没有时为空字符串。
默认值: — · 访问器: get_source_url() · 只读
lineint
来源行号;不可用时为 0。
默认值: — · 访问器: get_line() · 只读
columnint
来源列号;不可用时为 0。
默认值: — · 访问器: get_column() · 只读
get_code
get_code() → String const读取 code。
get_message
get_message() → String const读取 message。
get_stack
get_stack() → String const读取 stack。
get_source_url
get_source_url() → String const读取 source_url。
get_line
get_line() → int const读取 line。
get_column
get_column() → int const读取 column。