Validate paramaters in onError in NS Client
This commit is contained in:
parent
43495e2565
commit
385781de23
1 changed files with 5 additions and 1 deletions
|
@ -401,7 +401,11 @@ public class NSClientService extends Service {
|
||||||
private Emitter.Listener onError = new Emitter.Listener() {
|
private Emitter.Listener onError = new Emitter.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void call(final Object... args) {
|
public void call(final Object... args) {
|
||||||
RxBus.INSTANCE.send(new EventNSClientNewLog("ERROR", args[0].toString()));
|
String msg = "Unknown Error";
|
||||||
|
if (args.length > 0 && args[0] != null) {
|
||||||
|
msg = args[0].toString();
|
||||||
|
}
|
||||||
|
RxBus.INSTANCE.send(new EventNSClientNewLog("ERROR", msg));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue