
com.icerockdev.exception.ExtUserException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web-utils Show documentation
Show all versions of web-utils Show documentation
Ktor based web-server with validation and internationalization
/*
* Copyright 2020 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license.
*/
package com.icerockdev.exception
import com.icerockdev.api.ErrorResponse
abstract class ExtUserException(status: Int, message: String) : UserException(status, message) {
open var data: List = mutableListOf()
override fun getErrorResponse(): ErrorResponse {
return ErrorResponse().also {
it.status = this.status
it.message = this.message.toString()
it.success = false
it.data = data
}
}
protected fun setErrors(list: List) {
this.data = list
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy