This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Sam, > I noticed, when attempting to write a ut_error_message_handler that > threw a C++ exception, that the udunits2 routines set the status > after calling ut_handle_error_message(). (I understand the udunits2 > code is not designed to be C++ exception safe — this was just in > some test code.) > > An unfortunate consequence is that the error message handler > cannot tell (without text parsing) what sort of error occurred, and > adjust its behaviour accordingly. It would be very useful to be able > to check the status at the time the error message was handled; > would it be reasonable to swap the standard order of > ut_set_status() and ut_handle_error_message() in the library? Sounds like a good idea. I'll see about implementing it. > Cheers, > Sam Yates Regards, Steve Emmerson Ticket Details =================== Ticket ID: LGA-513161 Department: Support UDUNITS Priority: Normal Status: Closed