From 3d23068f3a1430d5849ede3f886e7356040bc146 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 2 Nov 2009 21:05:42 +0100 Subject: WL#4903 Plugin Service API part I (mysql-next-mr backport) --- mysys/my_error.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'mysys/my_error.c') diff --git a/mysys/my_error.c b/mysys/my_error.c index ff9156faf82..e2523a39d0b 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -125,6 +125,29 @@ void my_printf_error(uint error, const char *format, myf MyFlags, ...) DBUG_VOID_RETURN; } +/* + Error with va_list + + SYNOPSIS + my_printv_error() + error Errno + format Format string + MyFlags Flags + ... variable list +*/ + +void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) +{ + char ebuff[ERRMSGSIZE]; + DBUG_ENTER("my_printv_error"); + DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d format: %s", + error, MyFlags, errno, format)); + + (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); + (*error_handler_hook)(error, ebuff, MyFlags); + DBUG_VOID_RETURN; +} + /* Give message using error_handler_hook -- cgit v1.2.1