Errors crash the code when using C interface
I notice that run-time errors (e.g. trying to open a non-existing file) throw an exception. The C interface doesn't allow catching these exceptions and thus always crash the code.
I am currently examining writing a Julia wrapper https://github.com/eschnett/Conduit.jl using the C interface and this would be a serious problem.
@eschnett thanks for this report and we understand this issue.
Here is a related discussion of a possible path forward:
https://github.com/LLNL/conduit/issues/1065
To summarize - two options:
-
Provide an error status function and try / catch to avoid exceptions reaching C -- (I think this is pragmatic path foward)
-
A new C API that provides error code for all calls.
Thanks. (FWIW, from a cleanliness point of view I'd prefer a new API that returns error codes.)