Subversion Repositories gelsvn

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 bj 1
#ifndef __CGLA_EXCEPTIONSTANDARD_H__
2
#define __CGLA_EXCEPTIONSTANDARD_H__
3
 
4
#include <string>
5
#include <iostream>
6
 
7
namespace CGLA
8
{
9
 
10
	class CGLAMotherException
11
	{
12
		std::string str;
13
	public:
14
		CGLAMotherException(const std::string s)
15
			{
16
				str = s;
17
			}
18
 
19
		void print(std::ostream& os) const 
20
		{
21
			os << str << std::endl; 
22
		}
23
	};
24
 
25
#define CGLA_DERIVEEXCEPTION(nameoe)															\
26
	class nameoe: public CGLAMotherException									\
27
	{																													\
28
	public:																										\
29
		nameoe(const std::string& s): CGLAMotherException(s) {}	\
30
	};																												\
31
 
32
}
33
 
34
#endif