Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change InteropBindingException to public #86

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Exceptions/InteropBindingException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Concordium.Sdk.Exceptions;
/// <summary>
/// Thrown when a interop call failed with possible error as message.
/// </summary>
internal sealed class InteropBindingException : Exception
public sealed class InteropBindingException : Exception
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of leaking the internals of the SDK, but if you need this we can merge it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the users ever want to catch this? What can they do in that case? Is this also used for normal error handling?

I think that a design should rather be talking about user meaningful errors and exceptions, not about the fact that there is some FFI binding somewhere. Users should not need to know that or care about it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used for the errors returned by the FFI to rust, so they are needed by the user.
I have discussed this with Søren and the plan is now to rename and change this exception to contain an error code (enum matching the rust side error) and the error message provided by rust.

{
private const string EmptyErrorMessage = "Empty error message returned";

Expand Down
Loading