#include <serial.h>
serial::IOException::IOException |
( |
std::string |
file, |
|
|
int |
line, |
|
|
int |
errnum |
|
) |
| |
|
inlineexplicit |
700 : file_(file), line_(line), errno_(errnum) {
701 std::stringstream ss;
702 #if defined(_WIN32) && !defined(__MINGW32__) 703 char error_str [1024];
704 strerror_s(error_str, 1024, errnum);
706 char * error_str = strerror(errnum);
708 ss <<
"IO Exception (" << errno_ <<
"): " << error_str;
709 ss <<
", file " << file_ <<
", line " << line_ <<
".";
serial::IOException::IOException |
( |
std::string |
file, |
|
|
int |
line, |
|
|
const char * |
description |
|
) |
| |
|
inlineexplicit |
713 : file_(file), line_(line), errno_(0) {
714 std::stringstream ss;
715 ss <<
"IO Exception: " << description;
716 ss <<
", file " << file_ <<
", line " << line_ <<
".";
virtual serial::IOException::~IOException |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inlinevirtual |
serial::IOException::IOException |
( |
const IOException & |
other | ) |
|
|
inline |
720 : line_(other.line_), e_what_(other.e_what_), errno_(other.errno_) {}
int serial::IOException::getErrorNumber |
( |
| ) |
const |
|
inline |
virtual const char* serial::IOException::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
inlinevirtual |
725 return e_what_.c_str();
The documentation for this class was generated from the following file: