robusta icon indicating copy to clipboard operation
robusta copied to clipboard

Change result type for exceptions from `::robusta_jni::jni::errors::Result<T>` to `Result<T, E>`

Open giovanniberti opened this issue 2 years ago • 0 comments

In recent jni versions jni::errors::Result its error variant can no longer be constructed from a string. making the type useless for library code and/or application usage.

We should refactor this by allowing any result type to be capable of be used as a return type in #[call_type(safe)] methods. Also, in doing so we could use as the default exception message the return value of E::description() (where E the type of the error variant)

giovanniberti avatar Jan 06 '22 18:01 giovanniberti