com.tairitsu.ignotus.exception.business.UnauthorizedException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ignotus-exception Show documentation
Show all versions of ignotus-exception Show documentation
JSON:API like exception handler.
package com.tairitsu.ignotus.exception.business
import com.tairitsu.ignotus.exception.SingleApiException
/**
* 业务异常:未登录
*/
class UnauthorizedException : SingleApiException {
companion object {
const val CODE = "unauthorized"
}
constructor(detail: String) : super(401, CODE, detail)
constructor() : super(401, CODE, Translation.translateDetail(CODE))
init {
this.title = Translation.translateTitle(CODE)
}
}