Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit f7f37a0

Browse files
committed
Merge pull request #57 from OneNoteDev/iss56
Closes #56
2 parents c1565a9 + ac0cda3 commit f7f37a0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/src/main/java/com/microsoft/o365_android_onenote_rest/SignInActivity.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ private void start() {
118118
@Override
119119
public void onError(Exception e) {
120120
e.printStackTrace();
121+
String msg;
122+
if (null == (msg = e.getLocalizedMessage())) {
123+
msg = getString(R.string.signin_err);
124+
}
125+
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
121126
}
122127

123128
@Override

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333
<string name="err_setup_msg">This snippet requires a notebook, section, group, or page before it will run. For example if you are deleting a page, you must first have a page to delete. Check that the appropriate item exists before running this snippet.</string>
3434
<string name="et_hint">&lt;Your text here&gt;</string>
3535
<string name="warning_clientid_redirecturi_incorrect">The client ID or redirect URI is not valid. Enter a valid client ID and redirect URI in the ServiceConstants.java file and run again</string>
36+
<string name="signin_err">An error signing in has occurred. Check LogCat for details.</string>
3637
</resources>

0 commit comments

Comments
 (0)