All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.icerockdev.exception.ExtUserException.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/*
 * 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