package com.sambath.kunkhmer.app

import java.net.ConnectException
import java.net.SocketTimeoutException
import java.util.concurrent.TimeoutException

fun Throwable.getErrorCode(): String {
    return when (this) {
        is SocketTimeoutException -> "[120]"
        is ConnectException -> "[120]"
        is TimeoutException -> "[121]"
        else -> "[122]"
    }
}