Clean up error logging.
This commit is contained in:
parent
84ca57f432
commit
467282d385
|
@ -124,7 +124,8 @@ class PersistentTransactionManager(
|
||||||
updateEncoding(tx.id, encodedTx.raw, encodedTx.txId, encodedTx.expiryHeight)
|
updateEncoding(tx.id, encodedTx.raw, encodedTx.txId, encodedTx.expiryHeight)
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
val message = "failed to encode transaction due to : ${t.message} caused by: ${t.cause}"
|
var message = "failed to encode transaction due to : ${t.message}"
|
||||||
|
t.cause?.let { message += " caused by: $it" }
|
||||||
twig(message)
|
twig(message)
|
||||||
safeUpdate("updating transaction error info") {
|
safeUpdate("updating transaction error info") {
|
||||||
updateError(tx.id, message, ERROR_ENCODING)
|
updateError(tx.id, message, ERROR_ENCODING)
|
||||||
|
@ -158,7 +159,8 @@ class PersistentTransactionManager(
|
||||||
updateEncoding(tx.id, encodedTx.raw, encodedTx.txId, encodedTx.expiryHeight)
|
updateEncoding(tx.id, encodedTx.raw, encodedTx.txId, encodedTx.expiryHeight)
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
val message = "failed to encode shielding transaction due to : ${t.message} caused by: ${t.cause}"
|
var message = "failed to encode auto-shielding transaction due to : ${t.message}"
|
||||||
|
t.cause?.let { message += " caused by: $it" }
|
||||||
twig(message)
|
twig(message)
|
||||||
safeUpdate("updating shielding transaction error info") {
|
safeUpdate("updating shielding transaction error info") {
|
||||||
updateError(tx.id, message, ERROR_ENCODING)
|
updateError(tx.id, message, ERROR_ENCODING)
|
||||||
|
@ -203,8 +205,9 @@ class PersistentTransactionManager(
|
||||||
}
|
}
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
// a non-server error has occurred
|
// a non-server error has occurred
|
||||||
val message =
|
var message =
|
||||||
"Unknown error while submitting transaction: ${t.message} caused by: ${t.cause}"
|
"Unknown error while submitting transaction: ${t.message}"
|
||||||
|
t.cause?.let { message += " caused by: $it" }
|
||||||
twig(message)
|
twig(message)
|
||||||
safeUpdate("updating submission failure") {
|
safeUpdate("updating submission failure") {
|
||||||
updateError(tx.id, t.message, ERROR_SUBMITTING)
|
updateError(tx.id, t.message, ERROR_SUBMITTING)
|
||||||
|
|
|
@ -55,7 +55,6 @@ class WalletTransactionEncoder(
|
||||||
transparentSecretKey: String,
|
transparentSecretKey: String,
|
||||||
memo: ByteArray?
|
memo: ByteArray?
|
||||||
): EncodedTransaction = withContext(IO) {
|
): EncodedTransaction = withContext(IO) {
|
||||||
twig("TMP: createShieldingTransaction with $spendingKey and $transparentSecretKey and ${memo?.size}")
|
|
||||||
val transactionId = createShieldingSpend(spendingKey, transparentSecretKey, memo)
|
val transactionId = createShieldingSpend(spendingKey, transparentSecretKey, memo)
|
||||||
repository.findEncodedTransactionById(transactionId)
|
repository.findEncodedTransactionById(transactionId)
|
||||||
?: throw TransactionEncoderException.TransactionNotFoundException(transactionId)
|
?: throw TransactionEncoderException.TransactionNotFoundException(transactionId)
|
||||||
|
|
Loading…
Reference in New Issue