Improve error message

This commit is contained in:
Jordan Eldredge 2021-07-18 13:49:24 -07:00
parent 8f773f6362
commit 1f75d7ec4c

View file

@ -306,7 +306,7 @@ class Interpreter {
assert(
(obj.type === "OBJECT" && typeof obj.value) === "object" &&
obj.value != null,
"Guru Meditation: Tried to call method on null object"
`Guru Meditation: Tried to call method ${klass.name}.${methodName} on null object`
);
let value = obj.value[methodName](...methodArgs);