com.tairitsu.ignotus.exception.relation.SortInvalidException.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.relation
import com.tairitsu.ignotus.exception.SingleApiException
/**
* 对象关系异常:不合法的排序方式
* 用户提交的排序信息不在 Controller 定义的范围内
*/
class SortInvalidException : SingleApiException(400, CODE, Translation.translateDetail(CODE)) {
companion object {
const val CODE = "sort_invalid"
}
init {
this.title = Translation.translateTitle(CODE)
val t = HashMap()
this.source = t
t["parameter"] = "sort"
}
}