OpenAssetIO icon indicating copy to clipboard operation
OpenAssetIO copied to clipboard

Decorate `manager` middleware methods with catch-all exception converter

Open feltech opened this issue 2 years ago • 0 comments

What

Catch all non-OpenAssetIOException derived exceptions that propagate out of ManagerInterface methods in the Manager middleware, and re-throw an errors::UnhandledException with the same message.

Why

It is useful for hosts to know when an error caught far from the call site originated in the OpenAssetIO ecosystem. It also avoids the need for hosts to have an excessively broad `catch (const std::exception&) block around every OpenAssetIO API invocation, which many host implementers are wary of.

ACs

  • All Manager functions are decorated such that non-OpenAssetIOException derived exceptions are caught and transformed into an UnhandledException.

feltech avatar Sep 04 '23 17:09 feltech