Handle IllegalArgumentException thrown from openInputStream()

This commit is contained in:
Peter Osterlund 2019-08-10 18:10:14 +02:00
parent 7c4f43c156
commit 6c4ff122ac

View File

@ -818,7 +818,7 @@ public class DroidFish extends Activity
} }
} catch (IOException e) { } catch (IOException e) {
DroidFishApp.toast(R.string.failed_to_read_pgn_data, Toast.LENGTH_SHORT); DroidFishApp.toast(R.string.failed_to_read_pgn_data, Toast.LENGTH_SHORT);
} catch (SecurityException e) { } catch (SecurityException|IllegalArgumentException e) {
DroidFishApp.toast(e.getMessage(), Toast.LENGTH_LONG); DroidFishApp.toast(e.getMessage(), Toast.LENGTH_LONG);
} }
return new Pair<>(pgnOrFen,filename); return new Pair<>(pgnOrFen,filename);