serial
1.1.0
Cross-platform, serial port library written in C++
|
#include <serial.h>
Public Member Functions | |
IOException (std::string file, int line, int errnum) | |
IOException (std::string file, int line, const char *description) | |
virtual | ~IOException () throw () |
IOException (const IOException &other) | |
int | getErrorNumber () |
virtual const char * | what () const throw () |
serial::IOException::IOException | ( | std::string | file, |
int | line, | ||
int | errnum | ||
) | [inline, explicit] |
: file_(file), line_(line), e_what_ (strerror (errnum)), errno_(errnum) {}
serial::IOException::IOException | ( | std::string | file, |
int | line, | ||
const char * | description | ||
) | [inline, explicit] |
: file_(file), line_(line), e_what_ (description), errno_(0) {}
virtual serial::IOException::~IOException | ( | ) | throw () [inline, virtual] |
{}
serial::IOException::IOException | ( | const IOException & | other | ) | [inline] |
{ e_what_ = other.e_what_; }
int serial::IOException::getErrorNumber | ( | ) | [inline] |
{ return errno_; }
virtual const char* serial::IOException::what | ( | ) | const throw () [inline, virtual] |
{ std::stringstream ss; if (errno_ == 0) ss << "IO Exception: " << e_what_; else ss << "IO Exception (" << errno_ << "): " << e_what_; ss << ", file " << file_ << ", line " << line_ << "."; return ss.str ().c_str (); }