OLD | NEW |
(Empty) | |
| 1 #if defined(SWIGJAVA) || defined(SWIGCSHARP) |
| 2 #error "do not use this version of std_except.i" |
| 3 #endif |
| 4 |
| 5 %{ |
| 6 #include <stdexcept> |
| 7 %} |
| 8 |
| 9 #if defined(SWIG_STD_EXCEPTIONS_AS_CLASSES) |
| 10 |
| 11 namespace std { |
| 12 struct exception |
| 13 { |
| 14 virtual ~exception() throw(); |
| 15 virtual const char* what() const throw(); |
| 16 }; |
| 17 |
| 18 struct bad_exception : exception |
| 19 { |
| 20 }; |
| 21 |
| 22 struct logic_error : exception |
| 23 { |
| 24 logic_error(const string& msg); |
| 25 }; |
| 26 |
| 27 struct domain_error : logic_error |
| 28 { |
| 29 domain_error(const string& msg); |
| 30 }; |
| 31 |
| 32 struct invalid_argument : logic_error |
| 33 { |
| 34 invalid_argument(const string& msg); |
| 35 }; |
| 36 |
| 37 struct length_error : logic_error |
| 38 { |
| 39 length_error(const string& msg); |
| 40 }; |
| 41 |
| 42 struct out_of_range : logic_error |
| 43 { |
| 44 out_of_range(const string& msg); |
| 45 }; |
| 46 |
| 47 struct runtime_error : exception |
| 48 { |
| 49 runtime_error(const string& msg); |
| 50 }; |
| 51 |
| 52 struct range_error : runtime_error |
| 53 { |
| 54 range_error(const string& msg); |
| 55 }; |
| 56 |
| 57 struct overflow_error : runtime_error |
| 58 { |
| 59 overflow_error(const string& msg); |
| 60 }; |
| 61 |
| 62 struct underflow_error : runtime_error |
| 63 { |
| 64 underflow_error(const string& msg); |
| 65 }; |
| 66 } |
| 67 |
| 68 #endif |
OLD | NEW |