Commit 373e2593 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Catch RocketChatException instead of general Exception

parent 1e62d991
......@@ -7,6 +7,7 @@ import chat.rocket.android.server.domain.GetCurrentServerInteractor
import chat.rocket.android.server.domain.SaveChatRoomsInteractor
import chat.rocket.android.server.infraestructure.RocketChatClientFactory
import chat.rocket.android.util.launchUI
import chat.rocket.common.RocketChatException
import chat.rocket.core.RocketChatClient
import chat.rocket.core.internal.model.Subscription
import chat.rocket.core.internal.realtime.*
......@@ -261,7 +262,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
//TODO: Add the code to unsubscribe to all subscriptions.
client.disconnect()
view.onLogOut()
} catch (e: Exception) {
} catch (e: RocketChatException) {
Timber.e(e)
view.showMessage(e.message!!)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment