uniffi-rs icon indicating copy to clipboard operation
uniffi-rs copied to clipboard

Support exception hierarchies

Open bendk opened this issue 4 years ago • 0 comments

In the logins component, we currently have code like this and this. We create one error Enum, then wrap that as a variant of a top-level error Enum.

I think the most idomatic way to translate this into most languages would be an exception hierarchy like this:

  • LoginsError
    • InvalidLogin
      • EmptyOrigin
      • EmptyPassword
      • ...

It would be great if UniFFI could support this. I think the main thing to figure out is how to specify it in the UDL.

┆Issue is synchronized with this Jira Task ┆Issue Number: UNIFFI-101

bendk avatar Oct 25 '21 15:10 bendk