mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +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) {
|
||||
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 {
|
||||
|
@ -33,9 +33,9 @@ object HsmErrors {
|
||||
fun mapCryptoServerException(exception: Exception): Exception {
|
||||
// Try to decode the error code
|
||||
val crypto = exception as? CryptoServerException ?: exception.cause as? CryptoServerException
|
||||
if (crypto != null) {
|
||||
return Exception("(CryptoServer) ${HsmErrors.errors[crypto.ErrorCode]}", exception)
|
||||
return if (crypto != null) {
|
||||
Exception("(CryptoServer) ${HsmErrors.errors[crypto.ErrorCode]}", exception)
|
||||
} else {
|
||||
return exception
|
||||
exception
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user