Hello, we are seeing that exceptions thrown during...
# kotlinx-rpc
m
Hello, we are seeing that exceptions thrown during an RPC session gets serialized as `DeserializedException`; we would like to receive the original exception; is it possible to configure RPC to send the original exception over the wire?
👍 2
a
Hey! The exception handling is not top notch right now. You should be able to send/receive exception on jvm, however, other platforms are limited in that way
m
yeah, we are getting some exceptions, but not all of them. In particular what we are seeing is that
t.cause
is null, but the deserialize exception have the right message info, so the workaround is to recover the lost information via the
message
string, which is .. quite weak tbh
a
Yes, that is true, but there is no other way now, unfortunately
m
any insight as what's the limitation? the class field count seems a bit arbitrary
a
Two problems here: • not all exceptions exist on all platforms • there are custom exceptions, that need to be serialized somehow • it is a lot of work to make these work, and we have other priorities right now. We are essentially talking about the kRPC protocol internals, and the protocol itself needs a big redesign in general, and making exceptions better now could be useless, as any big redesign can require us to redo the work once more here