From c4e4985b8b96ed156851c6be6d4a8d5e110c3040 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Fri, 13 Dec 2024 17:42:27 +0100 Subject: Add error reporting framework --- .../kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt (limited to 'src/main/kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt') diff --git a/src/main/kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt b/src/main/kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt new file mode 100644 index 0000000..2d33075 --- /dev/null +++ b/src/main/kotlin/moe/nea/ledger/utils/telemetry/StringContext.kt @@ -0,0 +1,11 @@ +package moe.nea.ledger.utils.telemetry + +import com.google.gson.JsonElement +import com.google.gson.JsonPrimitive + +class StringContext(val message: String) : ContextValue { + override fun serialize(): JsonElement { + return JsonPrimitive(message) + } + +} -- cgit