mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Wrap JSON parse errors in cloneObject with context
This commit is contained in:
6
lib/entry-points.js
generated
6
lib/entry-points.js
generated
@@ -146069,7 +146069,11 @@ var BuildMode = /* @__PURE__ */ ((BuildMode3) => {
|
||||
return BuildMode3;
|
||||
})(BuildMode || {});
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
try {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
} catch (err) {
|
||||
throw new Error(`Cloning object failed: ${getErrorMessage(err)}`);
|
||||
}
|
||||
}
|
||||
async function cleanUpPath(file, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
|
||||
Reference in New Issue
Block a user