PageRenderTime 40ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Lib/std/std_except.i

#
Swig | 68 lines | 54 code | 14 blank | 0 comment | 0 complexity | 2cad6ed9adae967a1774c6b529476e0b MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #if defined(SWIGJAVA) || defined(SWIGCSHARP)
  2. #error "do not use this version of std_except.i"
  3. #endif
  4. %{
  5. #include <stdexcept>
  6. %}
  7. #if defined(SWIG_STD_EXCEPTIONS_AS_CLASSES)
  8. namespace std {
  9. struct exception
  10. {
  11. virtual ~exception() throw();
  12. virtual const char* what() const throw();
  13. };
  14. struct bad_exception : exception
  15. {
  16. };
  17. struct logic_error : exception
  18. {
  19. logic_error(const string& msg);
  20. };
  21. struct domain_error : logic_error
  22. {
  23. domain_error(const string& msg);
  24. };
  25. struct invalid_argument : logic_error
  26. {
  27. invalid_argument(const string& msg);
  28. };
  29. struct length_error : logic_error
  30. {
  31. length_error(const string& msg);
  32. };
  33. struct out_of_range : logic_error
  34. {
  35. out_of_range(const string& msg);
  36. };
  37. struct runtime_error : exception
  38. {
  39. runtime_error(const string& msg);
  40. };
  41. struct range_error : runtime_error
  42. {
  43. range_error(const string& msg);
  44. };
  45. struct overflow_error : runtime_error
  46. {
  47. overflow_error(const string& msg);
  48. };
  49. struct underflow_error : runtime_error
  50. {
  51. underflow_error(const string& msg);
  52. };
  53. }
  54. #endif