Improve diagnostics: show exception stack trace (#63)

Also add logging to the quiet exception handlers.
This commit is contained in:
Vlad-Shcherbina 2022-06-25 23:20:01 +02:00 committed by GitHub
parent cb2cf0cc7c
commit 2055a01dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -45,7 +45,7 @@ async function run() {
} catch (e) {
setCacheHitOutput(false);
core.info(`[warning] ${(e as any).message}`);
core.info(`[warning] ${(e as any).stack}`);
}
}

View File

@ -38,26 +38,34 @@ async function run() {
try {
await cleanRegistry(registryName, packages);
} catch {}
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
try {
await cleanBin();
} catch {}
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
try {
await cleanGit(packages);
} catch {}
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
try {
await cleanTarget(packages);
} catch {}
} catch (e) {
core.info(`[warning] ${(e as any).stack}`);
}
core.info(`Saving paths:\n ${savePaths.join("\n ")}`);
core.info(`In directory:\n ${process.cwd()}`);
core.info(`Using key:\n ${key}`);
await cache.saveCache(savePaths, key);
} catch (e) {
core.info(`[warning] ${(e as any).message}`);
core.info(`[warning] ${(e as any).stack}`);
}
}