com.tairitsu.ignotus.exception.business.ModelNotFoundException.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 ModelNotFoundException : SingleApiException {
companion object {
const val CODE = "model_not_found"
}
constructor(detail: String) : super(404, CODE, detail)
constructor() : super(404, CODE, Translation.translateDetail(CODE))
init {
this.title = Translation.translateTitle(CODE)
}
}