From 5927bb05ec99438414a62d93cf8b707e86fea946 Mon Sep 17 00:00:00 2001 From: Karl Werner Date: Tue, 25 May 2021 12:05:52 +0200 Subject: [PATCH 1/2] Pipeline: Additional information for stack trace error messages --- .../src/pipeline-execution/sandbox/vm2StacktraceParser.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/src/pipeline-execution/sandbox/vm2StacktraceParser.ts b/pipeline/src/pipeline-execution/sandbox/vm2StacktraceParser.ts index f26c1f4d9..bffd76cc9 100644 --- a/pipeline/src/pipeline-execution/sandbox/vm2StacktraceParser.ts +++ b/pipeline/src/pipeline-execution/sandbox/vm2StacktraceParser.ts @@ -10,7 +10,7 @@ import JobError from './jobError' export function parseStacktraceLine (line: string): [string, string, number, number] { const match = line.match(/^ +at (.+) \((.+):(\d+):(\d+)\)/) if (match === null) { - throw new Error('Unexpected stacktrace line format') + throw new Error(`Unexpected stacktrace line format: ${line}`) } const [, functionName, fileName, lineNumber, position] = match return [functionName, fileName, parseInt(lineNumber), parseInt(position)] @@ -24,7 +24,7 @@ export function parseStacktraceLine (line: string): [string, string, number, num function parseSyntaxErrorHeader (header: string): [string, number] { const match = header.match(/^(.+):(\d+)/) if (match === null) { - throw new Error('Unexpected stacktrace format') + throw new Error(`Unexpected stacktrace format: ${header}`) } const [, fileName, lineNumber] = match return [fileName, parseInt(lineNumber)] From 5be346c85fce0aad0604a964945bd983c79668a1 Mon Sep 17 00:00:00 2001 From: Karl Werner Date: Tue, 25 May 2021 12:06:23 +0200 Subject: [PATCH 2/2] Pipeline: Disable source maps to enable vm2 syntax error parsing --- pipeline/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipeline/package.json b/pipeline/package.json index e1dcae3d9..61161311d 100644 --- a/pipeline/package.json +++ b/pipeline/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "scripts": { "start": "npm run transpile && npm run start:transpiled", - "start:transpiled": "node --enable-source-maps dist/index.js", + "start:transpiled": "node dist/index.js", "transpile": "tsc", "lint": "eslint src --fix", "lint-ci": "eslint src --max-warnings=0",