summaryrefslogtreecommitdiff
path: root/mysys/my_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_error.c')
-rw-r--r--mysys/my_error.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/mysys/my_error.c b/mysys/my_error.c
index fa62cc604b6..a682585a82e 100644
--- a/mysys/my_error.c
+++ b/mysys/my_error.c
@@ -114,7 +114,7 @@ void my_printf_error(uint error, const char *format, myf MyFlags, ...)
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printf_error");
- DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d Format: %s",
+ DBUG_PRINT("my", ("nr: %d MyFlags: %d errno: %d format: %s",
error, MyFlags, errno, format));
va_start(args,MyFlags);
@@ -148,6 +148,30 @@ void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
DBUG_VOID_RETURN;
}
+
+/*
+ Error with va_list
+
+ SYNOPSIS
+ my_printv_error()
+ error Errno
+ format Format string
+ MyFlags Flags
+ ... variable list
+*/
+
+int my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
+{
+ char ebuff[ERRMSGSIZE+20];
+ 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);
+ DBUG_RETURN((*error_handler_hook)(error, ebuff, MyFlags));
+}
+
+
/*
Give message using error_handler_hook