mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +01:00
Fix error throwing for unknown errors
Fix error throwing for unknown errors. This should prevent unknown script/unknown error message and allow players to see custom errors that they throw.
This commit is contained in:
parent
c21644397d
commit
b0f7fdca44
@ -138,7 +138,8 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
|
||||
workerScript.errorMessage = e;
|
||||
throw workerScript;
|
||||
}
|
||||
throw e; // Don't know what to do with it, let's rethrow.
|
||||
workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, "Unknown error: " + JSON.stringify(e));
|
||||
throw workerScript;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user