CORDA-2945: Catch IllegalArgumentException to avoid shutdown of NodeExplorer

This commit is contained in:
Ryan Fowler 2019-06-03 10:52:58 +01:00 committed by Mike Hearn
parent 0234d8eb67
commit e1853f50d4

View File

@ -151,6 +151,7 @@ class NewTransaction : Fragment() {
val anonymous = true val anonymous = true
val defaultRef = OpaqueBytes.of(1) val defaultRef = OpaqueBytes.of(1)
val issueRef = if (issueRef.value != null) OpaqueBytes.of(issueRef.value) else defaultRef val issueRef = if (issueRef.value != null) OpaqueBytes.of(issueRef.value) else defaultRef
try {
when (it) { when (it) {
executeButton -> when (transactionTypeCB.value) { executeButton -> when (transactionTypeCB.value) {
CashTransaction.Issue -> IssueAndPaymentRequest(Amount.fromDecimal(amount.value, currencyChoiceBox.value), issueRef, partyBChoiceBox.value.party, selectNotary(), anonymous) CashTransaction.Issue -> IssueAndPaymentRequest(Amount.fromDecimal(amount.value, currencyChoiceBox.value), issueRef, partyBChoiceBox.value.party, selectNotary(), anonymous)
@ -160,6 +161,10 @@ class NewTransaction : Fragment() {
} }
else -> null else -> null
} }
} catch (e: IllegalArgumentException) {
ExceptionDialog(e).showAndWait()
null
}
} }
} }