axom
axom copied to clipboard
Group::load() and save() should return a success value
The lack of a success return value was a mistake in our design.
OK, that opening comment was off-target. Group::load()
and save()
wrap Conduit's relay::io::load()
and save()
. Those functions use exceptions to report problems. If it didn't throw an exception, it went OK. In Sidre, we re-wire "throw exception" to "call a function that calls a slic
logging function."
Maybe what we need to do is discuss this design choice in the documentation and example codes. Possibly we could have the handler functions store an error state and message, sort of "my very own sidre errno", with getters to make this state accessible to C and Fortran. As @cyrush pointed out, this does tend to get messy.
@agcapps is this issue resolved now?
hmmm, it isn't resolved. I would like to discuss it with the group. The fact that we don't have a clear status report bugs me, but it is non-trivial to do it any other way, and more importantly any other way would need a good design. I'd vote to keep this open.
Try to find time to discuss options as a group.