Catch IllegalArgumentException when decoding QrCode

This commit is contained in:
Torsten Grote
2017-08-01 10:21:02 -03:00
parent 050191f0ef
commit 0ee6197d7f

View File

@@ -218,7 +218,7 @@ public class ShowQrCodeFragment extends BaseEventFragment
statusView.setVisibility(VISIBLE);
status.setText(R.string.connecting_to_device);
task.connectAndRunProtocol(remotePayload);
} catch (IOException e) {
} catch (IOException | IllegalArgumentException e) {
// TODO show failure
Toast.makeText(getActivity(), R.string.qr_code_invalid,
LENGTH_LONG).show();