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