aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-11-01 17:44:31 +0100
committerRobert Jaros <rjaros@finn.pl>2019-11-01 17:44:31 +0100
commit5763aa3b0004b678d7791b32e1a92b6facb9b17e (patch)
tree3bd6ca99f2f2dbec9e196ca63215c7ba4bce6603 /kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft
parentc4a43b9c8ce6db65784e9bcb7073dcf6c4a6cd41 (diff)
downloadkvision-5763aa3b0004b678d7791b32e1a92b6facb9b17e.tar.gz
kvision-5763aa3b0004b678d7791b32e1a92b6facb9b17e.tar.bz2
kvision-5763aa3b0004b678d7791b32e1a92b6facb9b17e.zip
Better exception handling in server-side interfaces.
Diffstat (limited to 'kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft')
-rw-r--r--kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/JsonRpc.kt1
-rw-r--r--kvision-modules/kvision-common-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteTypes.kt2
2 files changed, 3 insertions, 0 deletions
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,