Subversion Repositories gelsvn

Rev

Rev 2 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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