Improved error handling

This commit is contained in:
M66B
2019-01-05 19:17:34 +00:00
parent f1a171261f
commit 26a15ea06d
3 changed files with 17 additions and 5 deletions

View File

@@ -1009,8 +1009,10 @@ public class FragmentSetup extends FragmentEx {
Uri uri = args.getParcelable("uri");
String password = args.getString("password");
if ("file".equals(uri.getScheme()))
if ("file".equals(uri.getScheme())) {
Log.w("Export uri=" + uri);
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
}
OutputStream out = null;
try {
@@ -1113,8 +1115,10 @@ public class FragmentSetup extends FragmentEx {
Uri uri = args.getParcelable("uri");
String password = args.getString("password");
if ("file".equals(uri.getScheme()))
if ("file".equals(uri.getScheme())) {
Log.w("Import uri=" + uri);
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
}
InputStream in = null;
try {