OSDN Git Service

first
[psychlops/cpp.git] / psychlops / core / ApplicationInterfaces / psychlops_code_exception.h
1 /*\r
2  *  psychlops_code_exception.h\r
3  *  Psychlops Standard Library (Universal)\r
4  *\r
5  *  Last Modified 2005/12/17 by Kenchi HOSOKAWA\r
6  *  (C) 2005 Kenchi HOSOKAWA, Kazushi MARUYA, Takao SATO\r
7  */\r
8 \r
9 #ifndef HEADER_PSYCHLOPS_CODINGSUPPORT_EXCEPTION\r
10 #define HEADER_PSYCHLOPS_CODINGSUPPORT_EXCEPTION\r
11 \r
12 \r
13 #include <typeinfo>\r
14 #include <string>\r
15 #include <iostream>\r
16 \r
17 \r
18 namespace Psychlops {\r
19 \r
20 \r
21         class Exception {\r
22                 public:\r
23                 const std::type_info &ti_;\r
24                 std::string category_;\r
25                 std::string str_;\r
26                 std::string backtrace_;\r
27                 static Exception dummy_;\r
28 \r
29                 public:\r
30                 Exception();\r
31                 Exception(const std::type_info &ti);\r
32                 Exception(std::string str);\r
33                 Exception(const char *str);\r
34                 Exception(const std::type_info &ti, std::string category);\r
35                 Exception(const std::type_info &ti, const char *category);\r
36                 Exception(const std::type_info &ti, std::string category, std::string str);\r
37                 Exception(const std::type_info &ti, const char *category, const char *str);\r
38                 std::string to_s();\r
39                 std::string toString();\r
40                 std::string getErrorString();\r
41         };\r
42
43 namespace Prototype {
44
45         extern double debug_double[8];
46
47 }\r
48 \r
49 }       /*      <- namespace Psychlops  */\r
50 \r
51 \r
52 #endif\r