Skip to content

Commit

Permalink
Add info when something is not supposed to happen
Browse files Browse the repository at this point in the history
  • Loading branch information
esafirm committed Jan 17, 2018
1 parent 3f42feb commit b1dd991
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void run() {

File file = makeSafeFile(path);
if (file != null && file.exists()) {
if(exlucedImages != null && exlucedImages.contains(file))
if (exlucedImages != null && exlucedImages.contains(file))
continue;

Image image = new Image(id, name, path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected void onCreate(Bundle savedInstanceState) {
/* This should not happen */
Intent intent = getIntent();
if (intent == null || intent.getExtras() == null) {
IpLogger.getInstance().e("This should not happen. Please open an issue!");
finish();
return;
}
Expand Down Expand Up @@ -115,6 +116,9 @@ private ImagePickerConfig getImagePickerConfig() {
if (config == null) {
Intent intent = getIntent();
Bundle bundle = intent.getExtras();
if (bundle == null) {
throw new IllegalStateException("This should not happen. Please open an issue!");
}
config = bundle.getParcelable(ImagePickerConfig.class.getSimpleName());
}
return config;
Expand Down

0 comments on commit b1dd991

Please sign in to comment.