{"record":{"id":"c55127fcda7e47d2","repo":"oven-sh/bun","slug":"non-zero-exit-code-in-file-file-runtime-run","errorCode":null,"errorMessage":"Non-zero exit code in file ${file}, runtime: ${runtime}","messagePattern":"Non-zero exit code in file (.+?), runtime: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"bench/snippets/runner-entrypoint.js","lineNumber":169,"sourceCode":"        benchmarkID,\n        result: json,\n        runtime: runtime,\n        timestamp,\n        elapsed: spawnElapsed,\n        runtimeVersion: (runtime === \"bun\"\n          ? `${Bun.version}-${Bun.revision}`\n          : String(json?.runtime).split(\" \").at(1)\n        ).replace(/^v/, \"\"),\n      };\n    } catch (e) {\n      console.error(\"Failing file\", file);\n      console.error(JSON.stringify(cmds[runtime]));\n      console.error(stdout.toString());\n      throw e;\n    }\n\n    if (exitCode !== 0) {\n      throw new Error(\"Non-zero exit code in file \" + JSON.stringify(file) + \", runtime: \" + JSON.stringify(runtime));\n    }\n  }\n}\n\nconst db = Database.open(process.RUNNER_DB_PATH ?? `runs-${process.platform}-${process.arch}.db`);\ndb.run(`CREATE TABLE IF NOT EXISTS benchmarkResults (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    results TEXT NOT NULL\n);`);\ndb.run(`\nCREATE TABLE IF NOT EXISTS runs (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    runtime TEXT NOT NULL,\n    runtimeVersion TEXT NOT NULL,\n    benchmarkID TEXT NOT NULL,\n    timestamp INTEGER NOT NULL,\n    elapsed REAL NOT NULL,\n    benchmarkResultID INTEGER NOT NULL","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/bench/snippets/runner-entrypoint.js#L151-L187","documentation":"Error \"Non-zero exit code in file ${file}, runtime: ${runtime}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at bench/snippets/runner-entrypoint.js:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}