From 5763aa3b0004b678d7791b32e1a92b6facb9b17e Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Fri, 1 Nov 2019 17:44:31 +0100 Subject: Better exception handling in server-side interfaces. --- .../src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt | 1 + .../src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt | 2 ++ 2 files changed, 3 insertions(+) (limited to 'kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote') diff --git a/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt b/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt index 7953ea01..d82189a0 100644 --- a/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt +++ b/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt @@ -33,5 +33,6 @@ data class JsonRpcResponse( val id: Int? = null, val result: String? = null, val error: String? = null, + val exceptionType: String? = null, val jsonrpc: String = "2.0" ) diff --git a/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt b/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt index 29cb6a9b..62b2354b 100644 --- a/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt +++ b/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt @@ -23,6 +23,8 @@ package pl.treksoft.kvision.remote import kotlinx.serialization.Serializable +class ServiceException(message: String) : Exception(message) + @Serializable data class RemoteOption( val value: String? = null, -- cgit