package com.casic.electric.detector.extensions

import java.net.ConnectException

fun Throwable.convertChinese(): String {
    this.printStackTrace()
    return when (this) {
        is ConnectException -> "连接失败，请检查网络或者服务器"
        else -> "服务器异常，请联系管理员"
    }
}