mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
Dump exception to System.err (#213)
This commit is contained in:
parent
5dc15b8032
commit
3094e44115
@ -141,7 +141,8 @@ private fun startNetworkingMapSigningPolling(networkMapStorage: NetworkMapStorag
|
|||||||
|
|
||||||
private fun processError(exception: Exception) {
|
private fun processError(exception: Exception) {
|
||||||
val processed = mapCryptoServerException(exception)
|
val processed = mapCryptoServerException(exception)
|
||||||
System.err.println("An error occurred: ${processed.message}")
|
System.err.println("An error occurred:")
|
||||||
|
processed.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun confirmedSign(selectedItems: List<ApprovedCertificateRequestData>): Boolean {
|
private fun confirmedSign(selectedItems: List<ApprovedCertificateRequestData>): Boolean {
|
||||||
|
@ -33,9 +33,9 @@ object HsmErrors {
|
|||||||
fun mapCryptoServerException(exception: Exception): Exception {
|
fun mapCryptoServerException(exception: Exception): Exception {
|
||||||
// Try to decode the error code
|
// Try to decode the error code
|
||||||
val crypto = exception as? CryptoServerException ?: exception.cause as? CryptoServerException
|
val crypto = exception as? CryptoServerException ?: exception.cause as? CryptoServerException
|
||||||
if (crypto != null) {
|
return if (crypto != null) {
|
||||||
return Exception("(CryptoServer) ${HsmErrors.errors[crypto.ErrorCode]}", exception)
|
Exception("(CryptoServer) ${HsmErrors.errors[crypto.ErrorCode]}", exception)
|
||||||
} else {
|
} else {
|
||||||
return exception
|
exception
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user