Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
except/posix.h
Go to the documentation of this file.
1 /*! \file xstream/except/posix.h
2  *
3  * \brief exceptions related to POSIX systems calls
4  *
5  */
6 
7 #ifndef __XSTREAM_EXCEPT_POSIX_H
8 #define __XSTREAM_EXCEPT_POSIX_H
9 
10 #include <xstream/config.h>
11 
12 #include <string>
13 #include <xstream/except.h>
14 #include <xstream/posix.h>
15 
16 namespace xstream{
17  namespace posix{
18 
19 /*!
20  * \brief errors in POSIX usage
21  *
22  */
24 {
25  private:
26  std::string syscall; /*!< syscall that caused the error */
27  int error_code; /*!< errno */
28 
29  public:
30  general_error(const std::string& s, int e, const std::string& d="general error"):
31  xstream::fatal_error(d),syscall(s),error_code(e)
32  {};
33 
34  virtual ~general_error() throw()
35  {}
36 
37  virtual std::string module() const
38  {
39  return (xstream::fatal_error::module()+"::posix["+syscall+"]");
40  }
41 };
42 
43 }//namespace posix
44 }//namespace xstream
45 
46 #endif
Main header file for exception related to xstream library.
virtual std::string module() const
describes the current library module (zlib,bzlib,base64,...)
Definition: except/posix.h:37
char string[256]
general errors only detected at runtime, no solution possible
Definition: except.h:23
general_error(const std::string &s, int e, const std::string &d="general error")
Definition: except/posix.h:30
TEllipse * e
errors in POSIX usage
Definition: except/posix.h:23
virtual std::string module() const
describes the current library module (zlib,bzlib,base64,...)
Definition: except.h:33
POSIX helper objects and functions.