mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 18:22:58 +02:00
FIxed bug with script errors in nested progs
This commit is contained in:
@@ -104,8 +104,14 @@ function evaluate(exp, workerScript) {
|
||||
evaluateProgPromise.then(function(w) {
|
||||
resolve(workerScript);
|
||||
}, function(e) {
|
||||
workerScript.errorMessage = e.toString();
|
||||
reject(workerScript);
|
||||
if (typeof e === 'string' || e instanceof String) {
|
||||
workerScript.errorMessage = e;
|
||||
reject(workerScript);
|
||||
} else if (e instanceof WorkerScript) {
|
||||
reject(e);
|
||||
} else {
|
||||
reject(workerScript);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "call":
|
||||
|
||||
Reference in New Issue
Block a user