Better error message when invoking function that doesn't exist
parent
7f0eb21030
commit
16d1d3265b
|
@ -76,7 +76,11 @@ export abstract class CommonSystem {
|
|||
}
|
||||
|
||||
invokeSpaceFunction(name: string, args: any[]) {
|
||||
return this.scriptEnv.functions[name](...args);
|
||||
const fn = this.scriptEnv.functions[name];
|
||||
if (!fn) {
|
||||
throw new Error(`Function ${name} not found`);
|
||||
}
|
||||
return fn(...args);
|
||||
}
|
||||
|
||||
async applyAttributeExtractors(
|
||||
|
|
Loading…
Reference in New Issue