2 * Copyright (C) 2010 Kirill Smelkov <kirr@navytux.spb.ru>
3 * Copyright (C) 2011 Marine Bridge and Navigation Systems (http://mns.spb.ru/)
5 * This library is free software: you can Use, Study, Modify and Redistribute
6 * it under the terms of the GNU Lesser General Public License version 2.1, or
7 * any later version. This library is distributed WITHOUT ANY WARRANTY. See
8 * COPYING.LIB file for full License terms.
20 RawvError::RawvError(const char *msg
) : std::runtime_error(msg
)
23 RawvError::~RawvError() throw()
24 {} /* emits vtable here */
27 void die(const char *fmt
, ...)
32 vsnprintf(msg
, sizeof(msg
), fmt
, ap
);
36 void die_errno(const char *s
)
38 die ("%s error %d, %s", s
, errno
, strerror (errno
));
41 void warn(const char *fmt
, ...)
45 vfprintf(stderr
, fmt
, ap
);
48 void warn_errno(const char *s
)
50 warn ("W: %s error %d, %s\n", s
, errno
, strerror (errno
));