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

commonMain.s2.dsl.automate.S2Error.kt Maven / Gradle / Ivy

There is a newer version: 0.16.0
Show newest version
package s2.dsl.automate

import kotlin.js.JsExport
import kotlin.js.JsName

@JsExport
@JsName("S2Error")
interface S2Error {
	val type: String
	val description: String
	val date: String
	val payload: Map
}

@JsExport
@JsName("S2ErrorBase")
class S2ErrorBase(
	override val type: String,
	override val description: String,
	override val date: String,
	override val payload: Map,
) : S2Error {

	override fun toString(): String {
		return "S2ErrorBase(type='$type', description='$description', date='$date', payload=$payload)"
	}
}

fun s2error(code: String, description: String, payload: Map): S2ErrorBase {
	return S2ErrorBase(
		type = code,
		description = description,
		date = "",
		payload = payload
	)
}

fun s2warning(code: String, description: String, payload: Map): S2ErrorBase {
	return S2ErrorBase(
		type = code,
		description = description,
		date = "",
		payload = payload
	)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy