Always report unexpected errors

pull/146/head
M66B 7 years ago
parent fe60acee7c
commit ce88d04a0f

@ -578,6 +578,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
.putExtra("id", id));
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(ActivityView.this, ex);
}
}.load(this, new Bundle());
}
@ -741,6 +746,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
.putExtra("account", account)
.putExtra("folder", folder));
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(ActivityView.this, ex);
}
}.load(this, args);
}
@ -1379,7 +1389,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override
protected void onException(Bundle args, Throwable ex) {
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
Helper.unexpectedError(ActivityView.this, ex);
}
}.load(this, args);

@ -149,6 +149,11 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
EntityAttachment.getFile(context, attachment.id).delete();
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
} else if (view.getId() == R.id.ivSave) {
@ -256,6 +261,11 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}
}

@ -1130,6 +1130,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
properties.setExpanded(data.message.id, false);
notifyDataSetChanged();
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}
@ -1267,6 +1272,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}
})
@ -1297,6 +1307,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}
}
@ -1305,6 +1320,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
})
.show();
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}
@ -1500,6 +1520,11 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
popupMenu.show();
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
}

@ -95,6 +95,11 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
EntityOperation.process(context);
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, ex);
}
}.load(context, owner, args);
return true;

@ -994,6 +994,11 @@ public class FragmentAccount extends FragmentEx {
protected void onLoaded(Bundle args, Integer count) {
cbPrimary.setChecked(count == 0);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentAccount.this, new Bundle());
} else {
int provider = savedInstanceState.getInt("provider");
@ -1030,8 +1035,18 @@ public class FragmentAccount extends FragmentEx {
folders = new ArrayList<>();
setFolders(folders);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentAccount.this, args);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args);
}

@ -122,6 +122,11 @@ public class FragmentAnswer extends FragmentEx {
pbWait.setVisibility(View.GONE);
grpReady.setVisibility(View.VISIBLE);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args);
}

@ -1330,6 +1330,11 @@ public class FragmentCompose extends FragmentEx {
}
});
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentCompose.this, a);
getActivity().invalidateOptionsMenu();

@ -366,6 +366,11 @@ public class FragmentFolder extends FragmentEx {
btnSave.setEnabled(true);
ibDelete.setVisibility(folder == null || !EntityFolder.USER.equals(folder.type) ? View.GONE : View.VISIBLE);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args);
}
}

@ -644,6 +644,11 @@ public class FragmentIdentity extends FragmentEx {
protected void onLoaded(Bundle args, Integer count) {
cbPrimary.setChecked(count == 0);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentIdentity.this, new Bundle());
} else {
tilPassword.getEditText().setText(savedInstanceState.getString("password"));
@ -737,8 +742,18 @@ public class FragmentIdentity extends FragmentEx {
spAccount.setSelection(account);
}
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentIdentity.this, args);
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args);
}
@ -797,6 +812,11 @@ public class FragmentIdentity extends FragmentEx {
}
}
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args);
}

@ -650,6 +650,11 @@ public class FragmentMessages extends FragmentEx {
popupMenu.show();
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentMessages.this, args);
}
@ -1135,6 +1140,11 @@ public class FragmentMessages extends FragmentEx {
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("search");
fragmentTransaction.commit();
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentMessages.this, args);
} else {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();

@ -175,6 +175,11 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(FragmentOptions.this, null);
}
});

Loading…
Cancel
Save