forked from defunkt/ReefVM
better error message
This commit is contained in:
parent
4b2fd61554
commit
fa021e3f18
|
|
@ -620,7 +620,7 @@ export class VM {
|
|||
}
|
||||
|
||||
if (fn.type !== 'function')
|
||||
throw new Error(`CALL: ${fn.type} is not a function (${fn.value})`)
|
||||
throw new Error(`CALL: ${fn.value} is not a function`)
|
||||
|
||||
if (this.callStack.length > 0)
|
||||
this.callStack[this.callStack.length - 1]!.isBreakTarget = true
|
||||
|
|
@ -712,7 +712,7 @@ export class VM {
|
|||
const tailFn = this.stack.pop()!
|
||||
|
||||
if (tailFn.type !== 'function')
|
||||
throw new Error(`TAIL_CALL: ${tailFn.type} is not a function (${tailFn.value})`)
|
||||
throw new Error(`TAIL_CALL: ${tailFn.value} is not a function`)
|
||||
|
||||
this.scope = new Scope(tailFn.parentScope)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user