| synopsis || arguments || prev || next |

::kdu_customize_errors

Java: Kdu_global::Kdu_customize_errors

void kdu_customize_errors( kdu_message * handler)

Java: void Kdu_customize_errors( Kdu_message handler)

[Declared in "../coresys/common/kdu_messaging.h"]


Synopsis

This function can and usually should be used to customize the behaviour of error messages produced using the kdu_error object. By default, error message text will be discarded, and the process will be terminated through exit whenever a kdu_error object is destroyed.


Arguments

handler [kdu_message *]

All text delivered to a kdu_error object will be passed to handler→put_text (unless handler is NULL) and all calls to kdu_error::flush will be generate calls to handler→flush, with the end_of_message argument set to false (regardless of the value of this argument in the call to kdu_error::flush). If a kdu_error object is destroyed, handler→flush will be called with an end_of_message argument equal to true and the process will subsequently be terminated through exit. The termination may be avoided, however, by throwing an exception from within the message terminating handler→flush call.


| top || synopsis || arguments || prev || next |