Commit d62c42c4 authored by gophi's avatar gophi

- fixed warning in throw.cc (thx Ed Nilsey)



git-svn-id: http://svn.chmurka.net/owx/trunk/owx@5 8cc89244-2450-4880-90d3-191243f3a0b0
parent 5e156650
/* $Id$ */
2011-04-13
- fixed warning in throw.cc (thx Ed Nilsey)
2011-03-14
- finally added owx to svn
- set rcsid property on owx files in svn
......
......@@ -11,6 +11,7 @@
#include <cstdio>
#include <cerrno>
#include "throw.h"
#include "intl.h"
void __attribute__((noreturn)) Throw(const char *fmt, ...)
{
......@@ -18,9 +19,12 @@ void __attribute__((noreturn)) Throw(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
vasprintf(&p, fmt, ap);
int rs(vasprintf(&p, fmt, ap));
va_end(ap);
if (rs == -1)
throw std::logic_error(_("Not enough memory to format error string"));
std::string s(p);
free(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment