Catch exceptions

This commit is contained in:
misaochan 2016-07-12 18:42:35 +12:00
parent 08e24d31a5
commit 82f2d58f58
2 changed files with 7 additions and 1 deletions

View file

@ -82,7 +82,11 @@ public class ContributionController {
break;
}
Log.i("Image", "Image selected");
activity.startActivity(shareIntent);
try {
activity.startActivity(shareIntent);
} catch (SecurityException e) {
Log.e("ContributionController", "Security Exception", e);
}
}
public void saveState(Bundle outState) {

View file

@ -123,6 +123,8 @@ public class UploadController {
Log.e("UploadController", "IO Exception: ", e);
} catch(NullPointerException e) {
Log.e("UploadController", "Null Pointer Exception: ", e);
} catch(SecurityException e) {
Log.e("UploadController", "Security Exception: ", e);
}
String mimeType = (String)contribution.getTag("mimeType");