diff options
Diffstat (limited to 'src/docs/error-handling.dox')
-rw-r--r-- | src/docs/error-handling.dox | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/docs/error-handling.dox b/src/docs/error-handling.dox index d1291e38ff0..d91a126ee21 100644 --- a/src/docs/error-handling.dox +++ b/src/docs/error-handling.dox @@ -55,14 +55,32 @@ This error is generated when wiredtiger_open is configured to return an error if @if IGNORE_BUILT_BY_API_ERR_END @endif -The ::wiredtiger_strerror function returns the standard message -associated with any WiredTiger, ISO C99, or POSIX 1003.1-2001 function: +@section error_translation Translating errors + +The WT_SESSION::strerror and ::wiredtiger_strerror functions return the +standard text message associated with any WiredTiger, ISO C, or POSIX +standard API. + +@snippet ex_all.c Display an error thread safe @snippet ex_all.c Display an error +Note that ::wiredtiger_strerror is not thread-safe. + @m_if{c} +@section error_handling_event Error handling using the WT_EVENT_HANDLER + More complex error handling can be configured by passing an implementation of WT_EVENT_HANDLER to ::wiredtiger_open or WT_CONNECTION::open_session. + +For example, both informational and error messages might be passed to an +application-specific logging function that added a timestamp and logged +the message to a file, and error messages might additionally be output to +the \c stderr file stream. + +@snippet ex_event_handler.c Function event_handler +@snippet ex_event_handler.c Configure event_handler + @m_endif */ |