improve logging a little bit

This commit is contained in:
zadam
2019-02-27 22:15:52 +01:00
parent 9f30d4e673
commit 8414d97ffa
3 changed files with 5 additions and 4 deletions

View File

@@ -161,7 +161,7 @@ async function transactional(func) {
}
let ret = null;
const error = new Error(); // to capture correct stack trace in case of exception
const thisError = new Error(); // to capture correct stack trace in case of exception
transactionActive = true;
transactionPromise = new Promise(async (resolve, reject) => {
@@ -179,7 +179,7 @@ async function transactional(func) {
}
catch (e) {
if (transactionActive) {
log.error("Error executing transaction, executing rollback. Inner exception: " + e.stack + error.stack);
log.error("Error executing transaction, executing rollback. Inner stack: " + e.stack + "\nOutside stack: " + thisError.stack);
await rollback();