package com.yidianling.ydlcommon.custom.http

import com.yidianling.common.tools.LogUtil

/**
 * @author yuanwai
 * @描述:自定义错误信息
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/8/30
 */
public open class YDLThrowable(val msg: String?, val throwable: YDLThrowable?, val urlParam: String?, val errorCode: Int?) : Throwable(msg!!, throwable!!) {

    constructor() : this("",null,"",-1)

    constructor(message: String?) : this(message, null, "", -1)

    constructor(message: String?, thro: YDLThrowable?) : this(message, thro, "", -1)

    constructor(message: String?, thro: YDLThrowable?, urlParams: String?) : this(message, thro, urlParams, -1)

    init {
        LogUtil.e("http-----------$urlParam----errorcode=$errorCode---msg=$msg")

    }
}