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

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

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

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

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

@ -122,6 +122,11 @@ public class FragmentAnswer extends FragmentEx {
pbWait.setVisibility(View.GONE); pbWait.setVisibility(View.GONE);
grpReady.setVisibility(View.VISIBLE); grpReady.setVisibility(View.VISIBLE);
} }
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(getContext(), ex);
}
}.load(this, args); }.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); }.load(FragmentCompose.this, a);
getActivity().invalidateOptionsMenu(); getActivity().invalidateOptionsMenu();

@ -366,6 +366,11 @@ public class FragmentFolder extends FragmentEx {
btnSave.setEnabled(true); btnSave.setEnabled(true);
ibDelete.setVisibility(folder == null || !EntityFolder.USER.equals(folder.type) ? View.GONE : View.VISIBLE); 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); }.load(this, args);
} }
} }

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

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

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

Loading…
Cancel
Save