/* $Id$ */

#ifndef _GNU_SOURCE
#	define _GNU_SOURCE
#endif

#include <cstdarg>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <cerrno>
#include <string>
#include "throw.h"

void __attribute__((noreturn)) Throw(const char *fmt, ...)
{
	char *p;
	va_list ap;

	va_start(ap, fmt);
	vasprintf(&p, fmt, ap);
	va_end(ap);

	std::string s(p);
	free(p);

	throw s;
}
