diff --git a/src/Netscript/NetscriptHelpers.tsx b/src/Netscript/NetscriptHelpers.tsx index 85d1f77f2..54935596b 100644 --- a/src/Netscript/NetscriptHelpers.tsx +++ b/src/Netscript/NetscriptHelpers.tsx @@ -363,8 +363,7 @@ function checkSingularityAccess(ctx: NetscriptContext): void { if (!canAccessBitNodeFeature(4)) { throw errorMessage( ctx, - `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. - It will be very obvious when and how you can obtain it.`, + `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.`, "API ACCESS", ); } @@ -381,10 +380,8 @@ function checkEnvFlags(ctx: NetscriptContext): void { log(ctx, () => "Failed to run due to failed concurrency check."); const err = errorMessage( ctx, - `Concurrent calls to Netscript functions are not allowed! - Did you forget to await hack(), grow(), or some other - promise-returning function? - Currently running: ${ws.env.runningFn} tried to run: ${ctx.function}`, + "Concurrent calls to Netscript functions are not allowed! Did you forget to await hack(), grow(), or some other " + + `promise-returning function?\nCurrently running: ${ws.env.runningFn}\nTried to run: ${ctx.function}`, "CONCURRENCY", ); killWorkerScript(ws); diff --git a/src/UncaughtPromiseHandler.ts b/src/UncaughtPromiseHandler.ts index 1ace614f9..3ac3cc159 100644 --- a/src/UncaughtPromiseHandler.ts +++ b/src/UncaughtPromiseHandler.ts @@ -3,10 +3,6 @@ import { handleUnknownError } from "./utils/ErrorHandler"; export function setupUncaughtPromiseHandler(): void { window.addEventListener("unhandledrejection", (e) => { e.preventDefault(); - handleUnknownError( - e.reason, - null, - "UNCAUGHT PROMISE ERROR\nYou forgot to await a promise\nmaybe hack / grow / weaken ?\n\n", - ); + handleUnknownError(e.reason, null, "UNCAUGHT PROMISE ERROR. Caused by:\n\n"); }); }