Skip to contents

push_error_handler() is a wrapper for CPLPushErrorHandler() in the GDAL Common Portability Library. This pushes a new error handler on the thread-local error handler stack. This handler will be used until removed with pop_error_handler(). A typical use is to temporarily set CPLQuietErrorHandler() which doesn't make any attempt to report passed error or warning messages, but will process debug messages via CPLDefaultErrorHandler.

Usage

push_error_handler(handler)

Arguments

handler

Character name of the error handler to push. One of quiet, logging or default.

Value

No return value, called for side effects.

Note

Setting handler = "logging" will use CPLLoggingErrorHandler(), error handler that logs into the file defined by the CPL_LOG configuration option, or stderr otherwise.

This only affects error reporting from GDAL.

Examples

push_error_handler("quiet")
# ...
pop_error_handler()