mirror of
https://github.com/Swatinem/rust-cache
synced 2025-04-05 21:24:07 +00:00
Improve diagnostics: show exception stack trace (#63)
Also add logging to the quiet exception handlers.
This commit is contained in:
parent
cb2cf0cc7c
commit
2055a01dcd
|
@ -45,7 +45,7 @@ async function run() {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setCacheHitOutput(false);
|
setCacheHitOutput(false);
|
||||||
|
|
||||||
core.info(`[warning] ${(e as any).message}`);
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
src/save.ts
18
src/save.ts
|
@ -38,26 +38,34 @@ async function run() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await cleanRegistry(registryName, packages);
|
await cleanRegistry(registryName, packages);
|
||||||
} catch {}
|
} catch (e) {
|
||||||
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await cleanBin();
|
await cleanBin();
|
||||||
} catch {}
|
} catch (e) {
|
||||||
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await cleanGit(packages);
|
await cleanGit(packages);
|
||||||
} catch {}
|
} catch (e) {
|
||||||
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await cleanTarget(packages);
|
await cleanTarget(packages);
|
||||||
} catch {}
|
} catch (e) {
|
||||||
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
|
}
|
||||||
|
|
||||||
core.info(`Saving paths:\n ${savePaths.join("\n ")}`);
|
core.info(`Saving paths:\n ${savePaths.join("\n ")}`);
|
||||||
core.info(`In directory:\n ${process.cwd()}`);
|
core.info(`In directory:\n ${process.cwd()}`);
|
||||||
core.info(`Using key:\n ${key}`);
|
core.info(`Using key:\n ${key}`);
|
||||||
await cache.saveCache(savePaths, key);
|
await cache.saveCache(savePaths, key);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.info(`[warning] ${(e as any).message}`);
|
core.info(`[warning] ${(e as any).stack}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue