[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: -logging
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: -logging |
Date: |
Wed, 08 Jan 2025 15:28:55 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 2a19c466c -logging
2a19c466c is described below
commit 2a19c466c5a9ac7a9e9c0bc196e0b2afceb4db5e
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Jan 8 15:28:51 2025 +0100
-logging
---
packages/taler-wallet-core/src/query.ts | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/packages/taler-wallet-core/src/query.ts
b/packages/taler-wallet-core/src/query.ts
index e0eeebb47..b48db9c90 100644
--- a/packages/taler-wallet-core/src/query.ts
+++ b/packages/taler-wallet-core/src/query.ts
@@ -110,7 +110,7 @@ function requestToPromise(req: IDBRequest): Promise<any> {
logger.warn("DB request failed, transaction aborted");
} else {
logger.error(`error in DB request: ${req.error}`);
- logger.error(`Request failed: ${stack}`);
+ logger.error(`Request failed: ${stack.stack ?? stack}`);
}
reject(req.error);
};
@@ -619,7 +619,7 @@ function runTx<Arg, Res>(
const msg =
"BUG: transaction closed before transaction function returned";
logger.error(msg);
- logger.error(`${stack.stack}`);
+ logger.error(`${stack.stack ?? stack}`);
reject(Error(msg));
} else {
resolve(funResult);
@@ -636,7 +636,7 @@ function runTx<Arg, Res>(
return;
}
logger.error("error in transaction");
- logger.error(`${stack.stack}`);
+ logger.error(`${stack.stack ?? stack}`);
const txError = tx.error;
if (txError) {
reject(txError);
@@ -663,7 +663,7 @@ function runTx<Arg, Res>(
aborted = true;
unregisterOnCancelled();
logger.error(msg);
- logger.error(`${stack.stack}`);
+ logger.error(`${stack.stack ?? stack}`);
reject(new TransactionAbortedError(msg));
};
const resP = Promise.resolve().then(() => f(arg, tx));
@@ -674,6 +674,10 @@ function runTx<Arg, Res>(
funResult = result;
})
.catch((e) => {
+ if (cancellationToken.isCancelled) {
+ logger.trace("Ignoring failed transaction due to cancellation.");
+ return;
+ }
if (e == TransactionAbort) {
logger.trace("aborting transaction");
tx.abort();
@@ -682,7 +686,7 @@ function runTx<Arg, Res>(
} else {
transactionException = e;
logger.error(`Transaction failed: ${safeStringifyException(e)}`);
- logger.error(`${stack}`);
+ logger.error(`${stack.stack ?? stack}`);
tx.abort();
}
})
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: -logging,
gnunet <=