Make sure the email being supplied is not used by any other user. This is because an email must be unique.
When calling saveInBackground
, it will actually not throw any exception if one does occur. So in your case, if the email is a duplicate, the email won't get saved and no exception is thrown.
To catch an exception with saveInBackground
, you can use the SaveCallback.
user.saveInBackground(new SaveCallback() {
public void done(ParseException e) {
if (e == null) {
// No exception
} else {
// Exception occured
}
}
});
For a list of exceptions you can refer to ParseException.