png_set_error_fn

Name

png_set_error_fn -- set user defined functions for error handling

Synopsis

#include <png.h>

void png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn);

Description

png_set_error_fn() shall replace the default error handling and warning functions with user defined function error_fn for handling fatal errors and function warning_fn for handling non-fatal errors. The replacement functions must do a longjmp to the last setjmp location if setjmp/longjmp method of error handling is used. If error_fn or warning_fn is NULL, the default functions for error handling shall be used.