示例#1
0
/*
 * XXX - should we use g_strdup_sprintf() here, so we're not limited by
 * XCEPT_BUFFER_SIZE?  We could then just use this to generate formatted
 * messages.
 */
G_GNUC_NORETURN WS_MSVC_NORETURN void except_throwf(long group, long code, const char *fmt, ...)
{
    char *buf = except_alloc(XCEPT_BUFFER_SIZE);
    va_list vl;

    va_start (vl, fmt);
    g_vsnprintf(buf, XCEPT_BUFFER_SIZE, fmt, vl);
    va_end (vl);
    except_throwd(group, code, buf, buf);
}
void except_throwf(long group, long code, const char *fmt, ...)
{
    char *buf = (char *) except_alloc(XCEPT_BUFFER_SIZE);
    va_list vl;

    va_start (vl, fmt);
    vsprintf(buf, fmt, vl);
    va_end (vl);
    except_throwd(group, code, buf, buf);
}