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

[MATLAB] Enable better support for error handling in the MATLAB interface #35768

Closed
kevingurney opened this issue May 25, 2023 · 8 comments
Closed

Comments

@kevingurney
Copy link
Member

kevingurney commented May 25, 2023

Describe the enhancement requested

Right now, there is limited support for error handling in the Proxy classes in the MATLAB interface. To make it easier to handle errors, we would need to leverage additional infrastructure in mathworks/libmexclass. Once that infrastructure has been added, we should update the relevant call sites that can error in the MATLAB interface.

See #35655 (comment) for an example of this.

Component(s)

MATLAB

@kou
Copy link
Member

kou commented May 25, 2023

Note that we don't need to use the C++'s exception feature for this. For example, Apache Arrow C++ uses arrow::Status instead of the C++'s exception feature.

We just need to propagate an error in Apache Arrow C++ or Apache Arrow MATLAB to an exception in MATLAB.

@kevingurney kevingurney changed the title [MATLAB] Enable better support for exception handling in the MATLAB interface [MATLAB] Enable better support for error handling in the MATLAB interface May 26, 2023
@kevingurney
Copy link
Member Author

Thanks for your input, @kou!

We actually had the same thought process. We would prefer to use an approach analogous to arrow::Result / arrow::Status rather than relying on C++'s exception handling patterns in the MATLAB interface.

I've updated the title and description of this issue to reflect the fact that we intend to focus primarily on our error handling approach in the MATLAB interface, rather than specifically using C++ exceptions.

@sgilmore10
Copy link
Member

take

@sgilmore10
Copy link
Member

sgilmore10 commented Jun 8, 2023

This issue was closed by #35918. I made an issue for adding error handling support without realizing this one already existed.

@kou
Copy link
Member

kou commented Jun 8, 2023

Can we close this as a duplicated issue?

@sgilmore10
Copy link
Member

Hi @kou,

Closing this as a duplicate issue sounds good to me! I'm not quite sure how to do that, or if I have the right permissions to.

Best,
Sarah

@kou
Copy link
Member

kou commented Jun 9, 2023

The issue author or maintainers can close an issue.
I close this as duplicate of #35918.

@kou kou closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2023
@kevingurney
Copy link
Member Author

Thank you, @kou! My apologies - I didn't realize I had the permissions to close the issue myself.

Thanks for letting me know for the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants