1
0
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:
untidylamp 2018-12-05 17:33:22 -05:00
parent 012093a20d
commit d8238797c6

View File

@ -28,6 +28,7 @@ import org.matrix.androidsdk.listeners.MXMediaUploadListener;
import org.matrix.androidsdk.rest.callback.SimpleApiCallback;
import org.matrix.androidsdk.rest.client.LoginRestClient;
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.login.Credentials;
@ -90,6 +91,21 @@ public class Matrix {
super.onSuccess(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);
}
});
}