IPVGO: Improve error logging to include stacktraces (#1212)

This commit is contained in:
Michael Ficocelli
2024-04-09 09:36:05 -04:00
committed by GitHub
parent 1ad6f9f310
commit 057ccc2a2b
2 changed files with 4 additions and 10 deletions

View File

@@ -22,14 +22,16 @@ import {
handlePassTurn,
makePlayerMove,
resetBoardState,
throwError,
validateMove,
validateTurn,
} from "../Go/effects/netscriptGoImplementation";
import { getEnumHelper } from "../utils/EnumHelper";
import { errorMessage } from "../Netscript/ErrorMessages";
const logger = (ctx: NetscriptContext) => (message: string) => helpers.log(ctx, () => message);
const error = (ctx: NetscriptContext) => (message: string) => throwError(ctx.workerScript, message);
const error = (ctx: NetscriptContext) => (message: string) => {
throw errorMessage(ctx, message);
};
/**
* Go API implementation