Пример #1
0
 private void sendExceptionMsg(int what, Exception e) {
   e.printStackTrace();
   Message msg = Message.obtain();
   msg.obj = e;
   msg.what = what;
   queryHandler.sendMessage(msg);
 }
Пример #2
0
        private void doRetryableAlert(Exception e, String msg) {
          AlertDialog.Builder dialog = new AlertDialog.Builder(SelectAccount.this);
          dialog.setTitle(msg);
          String dispMsg = msg + "\n\n" + e.getMessage();
          dialog.setMessage(dispMsg);
          dialog.setPositiveButton(
              "Retry",
              new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                  requestAccountList();
                }
              });
          dialog.setNegativeButton("Cancel", emptyClickListener);

          AlertDialog dlg = dialog.create();
          dlg.show();
        }