lpac_jni: Clear exceptions before setting response

This commit is contained in:
Peter Cai 2024-11-24 19:50:27 -05:00
parent dcae65011e
commit 96bc9865ff

View file

@ -30,6 +30,7 @@ class LocalProfileAssistantImpl(
override fun transmit(tx: ByteArray): ByteArray =
try {
apduInterface.transmit(tx).also {
lastApduException = null
lastApduResponse = it
}
} catch (e: Exception) {
@ -61,6 +62,7 @@ class LocalProfileAssistantImpl(
override fun transmit(url: String, tx: ByteArray, headers: Array<String>): HttpResponse =
try {
httpInterface.transmit(url, tx, headers).also {
lastHttpException = null
lastHttpResponse = it
}
} catch (e: Exception) {