mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-03 07:34:10 +03:00
don't swallow context disposed exceptions
This commit is contained in:
parent
769aeda6d3
commit
a79e2dace8
@ -24,17 +24,11 @@ extension Decoder on PlatformException {
|
||||
|
||||
bool _isApduException() => code == 'ApduException';
|
||||
|
||||
bool _isContextDisposed() => code == 'ContextDisposedException';
|
||||
|
||||
Exception decode() {
|
||||
if (_isCancellation()) {
|
||||
return CancellationException();
|
||||
}
|
||||
|
||||
if (_isContextDisposed()) {
|
||||
return CancellationException();
|
||||
}
|
||||
|
||||
if (message != null && _isApduException()) {
|
||||
final regExp = RegExp(
|
||||
r'^com.yubico.yubikit.core.smartcard.ApduException: APDU error: 0x(.*)$');
|
||||
|
Loading…
Reference in New Issue
Block a user