pdidev / pdi

The PDI Data Interface
https://pdi.dev
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Multiple error handling #339

Open jbigot opened 3 years ago

jbigot commented 3 years ago

In GitLab by @ksiero on May 20, 2021, 15:42

Would be nice to have some option to say if first error of data share should stop the execution or PDI should continue and collect all of exceptions.

Also an error wrapper would be nice that allow to handle exception on each step (e.g. if data is not available for writing or if HDF5 library cannot write a data (low disk space)).

jbigot commented 2 years ago

In GitLab by @youldrouis on Oct 1, 2021, 11:22

Is it an option to have the ability to transmit the error code to the calling routine in the user program and let it handle it?

jbigot commented 2 years ago

Is it an option to have the ability to transmit the error code to the calling routine in the user program and let it handle it?

No, it's not. You should find a bit more on error handling there: https://pdi.julien-bigot.fr/master/group__error.html

All function should return an error code. By default the assert error handler is set that stops your program before you can catch errors. You can change that using the PDI_errhandler function. You can choose between PDI_WARN_HANDLER, PDI_NULL_HANDLER or implement your own handler function

jbigot commented 10 months ago

unassigned @ksiero