|
@@ -2,7 +2,6 @@ package goja
|
|
|
|
|
|
import (
|
|
import (
|
|
"fmt"
|
|
"fmt"
|
|
- "log"
|
|
|
|
"math"
|
|
"math"
|
|
"runtime"
|
|
"runtime"
|
|
"strconv"
|
|
"strconv"
|
|
@@ -364,11 +363,14 @@ func (vm *vm) try(f func()) (ex *Exception) {
|
|
case *Exception:
|
|
case *Exception:
|
|
ex = x1
|
|
ex = x1
|
|
default:
|
|
default:
|
|
- if vm.prg != nil {
|
|
|
|
- vm.prg.dumpCode(log.Printf)
|
|
|
|
- }
|
|
|
|
- //log.Print("Stack: ", string(debug.Stack()))
|
|
|
|
- panic(fmt.Errorf("Panic at %d: %v", vm.pc, x))
|
|
|
|
|
|
+ /*
|
|
|
|
+ if vm.prg != nil {
|
|
|
|
+ vm.prg.dumpCode(log.Printf)
|
|
|
|
+ }
|
|
|
|
+ log.Print("Stack: ", string(debug.Stack()))
|
|
|
|
+ panic(fmt.Errorf("Panic at %d: %v", vm.pc, x))
|
|
|
|
+ */
|
|
|
|
+ panic(x)
|
|
}
|
|
}
|
|
ex.stack = vm.captureStack(ex.stack, ctxOffset)
|
|
ex.stack = vm.captureStack(ex.stack, ctxOffset)
|
|
}
|
|
}
|