Display MessageDialog on error.
[mediadatabase.git] / libfrontend / error.c
blobfea571cb01392f255051766d1d6de3f5173a214b
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * $Id: error.c,v 1.1 2004/05/16 19:01:17 nedko Exp $
6 * DESCRIPTION:
7 * Mediadatabase error handling.
9 * AUTHOR:
10 * Nedko Arnaudov <nedko@users.sourceforge.net>
12 * LICENSE:
13 * GNU GENERAL PUBLIC LICENSE version 2
15 *****************************************************************************/
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <stdarg.h>
21 #include "../result.h"
22 #include "error.h"
24 #define FORMATTING_BUFFER_SIZE 8*1024
26 void
27 mediadb_error_printf(
28 const char *pszFormat,
29 ...)
31 va_list argList;
32 char Buffer[FORMATTING_BUFFER_SIZE];
34 va_start(argList, pszFormat);
35 vsnprintf(Buffer, FORMATTING_BUFFER_SIZE-1, pszFormat, argList);
36 va_end(argList);
38 Buffer[FORMATTING_BUFFER_SIZE-1] = 0;
40 mediadb_error_callback(Buffer);
43 /*****************************************************************************
45 * Modifications log:
47 * !!! WARNING !!! Following lines are automatically updated by the CVS system.
49 * $Log: error.c,v $
50 * Revision 1.1 2004/05/16 19:01:17 nedko
51 * libfrontend holds code common to frontends but not in libdb.
53 *****************************************************************************/