serial  1.1.0
Cross-platform, serial port library written in C++
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Defines
Public Member Functions
serial::IOException Class Reference

#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 ()

Constructor & Destructor Documentation

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_;
  }

Member Function Documentation

{ 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 ();
  }

The documentation for this class was generated from the following file: