Unify error handling

This commit is contained in:
Snarling
2022-08-28 05:33:38 -04:00
parent 8dd507883a
commit 5798c4c7d3
21 changed files with 149 additions and 324 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ function wrapFunction(
const functionPath = tree.join(".");
const functionName = tree.pop();
if (typeof functionName !== "string") {
throw helpers.makeRuntimeRejectMsg(workerScript, "Failure occured while wrapping netscript api");
throw helpers.makeBasicErrorMsg(workerScript, "Failure occured while wrapping netscript api");
}
const ctx = {
workerScript,