瀏覽代碼

Added Exception.Stack() method. Closes #479

Valeriy Gorelov 1 年之前
父節點
當前提交
40ec41b444
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      runtime.go

+ 4 - 0
runtime.go

@@ -411,6 +411,10 @@ func (e *Exception) Unwrap() error {
 	return nil
 }
 
+func (e *Exception) Stack() []StackFrame {
+	return e.stack
+}
+
 func (r *Runtime) createIterProto(val *Object) objectImpl {
 	o := newBaseObjectObj(val, r.global.ObjectPrototype, classObject)