stacktrace
Types
位置
pub type Location {
Location(file: option.Option(String), line: option.Option(Int))
}
Constructors
-
Location(file: option.Option(String), line: option.Option(Int))file: 文件
line: 行号(仅供参考)
参数数量/列表
pub type Params {
Arity(Int)
Args(List(dynamic.Dynamic))
}
Constructors
-
Arity(Int)参数数量
-
Args(List(dynamic.Dynamic))参数列表
栈帧列表
pub type StackFrameList =
List(StackFrame)
Values
pub fn from_exception(
ex: error.Exception,
) -> Result(List(StackFrame), Nil)
从Exception获取StackFrameList
由于类型是公开的,你完全可以伪造一个Stacktrace