Whiteboard
An interface and tools for visualizing large and complex datasets
ErrorHandling.h
Go to the documentation of this file.
1 #ifndef ERRORHANDLING_H_
2 #define ERRORHANDLING_H_
3 
4 using namespace std;
5 
6 #include <string>
7 #include <iostream>
8 #include <stdio.h>
9 
11 {
12  public:
13  SException(const string & info, const string & type = "") {
14  m_type = type;
15  m_info = info;
16  cout << "EXCEPTION: " << type << " " << info << endl;
17  }
18 
19 
20  void Throw();
21 
22  private:
23  string m_type;
24  string m_info;
25 
26 };
27 
28 
29 inline void ThrowError(const string & info, const string & type) {
30  SException up(info, type);
31  up.Throw();
32 }
33 
34 
35 #endif //ERRORHANDLING_H_
36 
37 
38 
39 
40 
string m_type
Definition: ErrorHandling.h:23
void ThrowError(const string &info, const string &type)
Definition: ErrorHandling.h:29
string m_info
Definition: ErrorHandling.h:24
SException(const string &info, const string &type="")
Definition: ErrorHandling.h:13
void Throw()
Definition: ErrorHandling.cc:27
Definition: ErrorHandling.h:10