mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 21:57:11 +00:00
Simplified logging logic
Throwing an exception just to log its message makes no sense...
This commit is contained in:
parent
84cb69d170
commit
8b017acec9
1 changed files with 3 additions and 7 deletions
|
|
@ -190,16 +190,12 @@ public class MainActivity extends AppCompatActivity implements HabitRPGUserCallb
|
|||
boolean ans = editor.putString(getString(R.string.SP_username), user.getAuthentication().getLocalAuthentication().getUsername())
|
||||
.putString(getString(R.string.SP_email), user.getAuthentication().getLocalAuthentication().getEmail())
|
||||
.commit();
|
||||
try {
|
||||
if (!ans) {
|
||||
throw new Exception("Shared Preferences Username and Email error");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e("SHARED PREFERENCES", e.getMessage());
|
||||
|
||||
if (!ans) {
|
||||
Log.e("SHARED PREFERENCES", "Shared Preferences Username and Email error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue