[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #LGA-513161]: Checking ut_status in ut_error_message_handler.



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