sgilmore10 opened a new issue, #35914: URL: https://github.com/apache/arrow/issues/35914
### Describe the enhancement requested Integrate the latest version of `libmexclass` (commit [77f3d72](https://github.com/mathworks/libmexclass/commit/77f3d72c22a9ddab7b54ba325d757c3e82e57987)) to support error-handling. Here's an overview of the changes: 1. Added a simple class called `libmexclass::error::Error` which has two `std::string` member properties: `id` and `message`. 2. Added a new field named `error` to `libmexclass::proxy::method::Context`. `error` is a `std::optional<libmexclass::error::Error>`. Proxy class methods can set this field if an error occurred. 3. The gateway MEX function checks if `error` is set. If so, it throws a MATLAB facing error using the `id` and `message` stored in `error`. 4. To support throwing errors at construction, proxy classes are now required to define a static make function with the following signature: `libmexclass::proxy::MakeResult make(const libmexclass::proxy::FunctionArguments& constructor_arguments);` The output argument `libmexclass::proxy::MakeResult` is a typedef to `std::variant<std::shared_ptr<libmexclass::proxy::Proxy>, libmexclass::error::Error>`. ### Component(s) MATLAB -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
