diff options
Diffstat (limited to 'mysys/my_error.c')
-rw-r--r-- | mysys/my_error.c | 23 |
1 files changed, 23 insertions, 0 deletions
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 @@ -126,6 +126,29 @@ void my_printf_error(uint error, const char *format, myf MyFlags, ...) } /* + 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 SYNOPSIS |