mirror of
https://github.com/tijder/SmsMatrix.git
synced 2024-10-27 18:24:01 +00:00
catch Matrix onLogin errors
Catch Matrix errors login and network errors
This commit is contained in:
parent
012093a20d
commit
d8238797c6
@ -28,6 +28,7 @@ import org.matrix.androidsdk.listeners.MXMediaUploadListener;
|
|||||||
import org.matrix.androidsdk.rest.callback.SimpleApiCallback;
|
import org.matrix.androidsdk.rest.callback.SimpleApiCallback;
|
||||||
import org.matrix.androidsdk.rest.client.LoginRestClient;
|
import org.matrix.androidsdk.rest.client.LoginRestClient;
|
||||||
import org.matrix.androidsdk.rest.model.Event;
|
import org.matrix.androidsdk.rest.model.Event;
|
||||||
|
import org.matrix.androidsdk.rest.model.MatrixError;
|
||||||
import org.matrix.androidsdk.rest.model.Message;
|
import org.matrix.androidsdk.rest.model.Message;
|
||||||
import org.matrix.androidsdk.rest.model.login.Credentials;
|
import org.matrix.androidsdk.rest.model.login.Credentials;
|
||||||
|
|
||||||
@ -90,6 +91,21 @@ public class Matrix {
|
|||||||
super.onSuccess(credentials);
|
super.onSuccess(credentials);
|
||||||
onLogin(credentials);
|
onLogin(credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMatrixError(MatrixError e) {
|
||||||
|
Log.e(TAG, "onLogin MatrixError" + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNetworkError(Exception e) {
|
||||||
|
Log.e(TAG, "onLogin Network error" + e);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUnexpectedError(Exception e) {
|
||||||
|
Log.e(TAG, "onLogin Unexpected error" + e);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user