axom icon indicating copy to clipboard operation
axom copied to clipboard

Group::load() and save() should return a success value

Open agcapps opened this issue 5 years ago • 3 comments

The lack of a success return value was a mistake in our design.

agcapps avatar Sep 17 '19 15:09 agcapps

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 avatar Oct 02 '19 17:10 agcapps

@agcapps is this issue resolved now?

rhornung67 avatar Oct 12 '21 21:10 rhornung67

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.

agcapps avatar Oct 12 '21 22:10 agcapps

Try to find time to discuss options as a group.

rhornung67 avatar Jan 30 '23 22:01 rhornung67