Browse Source

Merge pull request #580 from a-donda/expose_exception_stack

Added Exception.Stack() method. Closes #479
Dmitry Panov 1 year ago
parent
commit
393f6d4249
1 changed files with 4 additions and 0 deletions
  1. 4 0
      runtime.go

+ 4 - 0
runtime.go

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