From 32bf0ec6a89f8a7e735894fbd81d80c2a53fc00f Mon Sep 17 00:00:00 2001 From: "Artem.Bukhonov" Date: Mon, 3 Nov 2025 22:34:48 +0100 Subject: [PATCH] Wrap exception from deferred to capture the current stack trace --- .../kotlin/com/agentclientprotocol/protocol/Protocol.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acp/src/commonMain/kotlin/com/agentclientprotocol/protocol/Protocol.kt b/acp/src/commonMain/kotlin/com/agentclientprotocol/protocol/Protocol.kt index acd0b43..f021c7a 100644 --- a/acp/src/commonMain/kotlin/com/agentclientprotocol/protocol/Protocol.kt +++ b/acp/src/commonMain/kotlin/com/agentclientprotocol/protocol/Protocol.kt @@ -498,7 +498,7 @@ private fun convertJsonRpcExceptionIfPossible(jsonRpcException: JsonRpcException } else -> { - return jsonRpcException + return IllegalStateException(jsonRpcException.message, jsonRpcException) } } } \ No newline at end of file