From 989bc1d7262c6e767de09804fb530a5ebea55a5d Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sat, 19 Apr 2003 14:50:22 +0000 Subject: [PATCH] Doxygen conversion of documentation (error handling). --- gedcom/message.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gedcom/message.c b/gedcom/message.c index 3fe288b..c756356 100644 --- a/gedcom/message.c +++ b/gedcom/message.c @@ -30,6 +30,21 @@ void cleanup_mess_buffer(); struct safe_buffer mess_buffer = { NULL, 0, NULL, 0, cleanup_mess_buffer }; Gedcom_msg_handler msg_handler = NULL; +/** This function registers a callback that is called if there are errors, + warnings or just messages coming from the parser. See + \ref Gedcom_msg_handler for the signature of the callback. + + For errors, the \c msg passed to the callback will have the format: + \code + Error on line : + \endcode + Note that the entire string will be properly internationalized, and + encoded in UTF-8 (Why UTF-8?). + Also, no newline is appended, so that + the application program can use it in any way it wants. Warnings are + similar, but use "Warning" instead of "Error". Messages are plain + text, without any prefix. +*/ void gedcom_set_message_handler(Gedcom_msg_handler func) { msg_handler = func; -- 2.30.2