NotaryException now provides the specific error information

This commit is contained in:
Andrius Dagys 2016-05-16 13:29:03 +01:00
parent 3ef8763d71
commit f363439a6c

View File

@ -99,7 +99,9 @@ class NotaryProtocol(private val wtx: WireTransaction,
}
}
class NotaryException(val error: NotaryError) : Exception()
class NotaryException(val error: NotaryError) : Exception() {
override fun toString() = "${super.toString()}: Error response from Notary - ${error.toString()}"
}
sealed class NotaryError {
class Conflict(val tx: WireTransaction, val conflict: SignedData<UniquenessProvider.Conflict>) : NotaryError() {