exception.h (2014-04-30 15:38:09 -0400, (build fd32605))
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include "defines.h"
5 
6 namespace af {
7 
9 {
10  public:
11  exception();
12  exception(const char *msg);
13  exception(const char *file, unsigned line);
14  exception(const char *file, unsigned line, const char *msg);
15  virtual ~exception() throw() {}
16  virtual const char *what() const throw() { return m_msg; }
17 
18  char m_msg[1024];
19 
20  friend inline std::ostream& operator<<(std::ostream &s, const exception &e) { return s << e.what(); }
21 };
22 
23 }
Definition: exception.h:8
friend std::ostream & operator<<(std::ostream &s, const exception &e)
Definition: exception.h:20
virtual ~exception()
Definition: exception.h:15
#define AFAPI
Definition: defines.h:45
virtual const char * what() const
Definition: exception.h:16