working on login bug

parent 17a24f5a
......@@ -18,4 +18,8 @@ public class LoginException extends Exception{
public boolean no_username_found() {return this.code==LoginException.UNKNOWN_USERNAME;}
public boolean no_pwd_found() {return this.code==LoginException.BAD_PASSWORD;}
public boolean no_supervisor_students() {return this.code==LoginException.NO_STUDENTS;}
public String getLocalizedMessage() {
return super.getLocalizedMessage()+" Username found:"+!no_username_found()+" Password found"+!no_pwd_found()+"Supervisor without students:"+no_supervisor_students();
}
}
......@@ -203,6 +203,7 @@ public class SerialActivity extends Activity {
, pictogramActivity);
} catch (JSONException e) {
GUITools.show_alert(SerialActivity.this, R.string.serverError, e.getMessage());
Log.e(this.getClass().getCanonicalName(), "JSON:"+ e.getLocalizedMessage());
progressDialog.dismiss();
}
......@@ -217,6 +218,7 @@ public class SerialActivity extends Activity {
GUITools.show_alert(SerialActivity.this, R.string.userErrorMsg);
else
GUITools.show_alert(SerialActivity.this, R.string.serverError, e.getMessage());
Log.e(this.getClass().getCanonicalName(), "Server error:"+ e.getLocalizedMessage());
}});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment