Skip to content

Commit

Permalink
prevent crash in logger when no message
Browse files Browse the repository at this point in the history
  • Loading branch information
ariefnurputranto committed Dec 1, 2020
1 parent 8b1efea commit 8236543
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Second, you need to add SDK dependencies inside your app .gradle. Then, you need
```
dependencies {
...
implementation 'com.qiscus.sdk:chat-core:1.3.24'
implementation 'com.qiscus.sdk:chat-core:1.3.25'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,21 @@ public final class QiscusErrorLogger {

public static void print(Throwable throwable) {
if (QiscusCore.getChatConfig().isEnableLog()) {
Log.e(TAG, getMessage(throwable));
try {
Log.e(TAG, getMessage(throwable));
} catch (NullPointerException n) {
Log.e(TAG, "error with no message");
}
}
}

public static void print(String tag, Throwable throwable) {
if (QiscusCore.getChatConfig().isEnableLog()) {
Log.e(tag, getMessage(throwable));
try {
Log.e(tag, getMessage(throwable));
} catch (NullPointerException n) {
Log.e(tag, "error with no message");
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Secondly, you need to add SDK dependencies inside your app .gradle. Then, you ne
```
dependencies {
...
implementation 'com.qiscus.sdk:chat-core:1.3.24'
implementation 'com.qiscus.sdk:chat-core:1.3.25'
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ chatVersionPatch=17
# === qiscus chat-core library version ===
chatCoreVersionMajor=1
chatCoreVersionMinor=3
chatCoreVersionPatch=24
chatCoreVersionPatch=25

# === qiscus default base url
BASE_URL_SERVER="https://api.qiscus.com/"
Expand Down

0 comments on commit 8236543

Please sign in to comment.