test all the STL exception classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8202 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b858051d51
commit
0589c365a6
1 changed files with 12 additions and 0 deletions
|
|
@ -17,5 +17,17 @@
|
|||
int foo2() throw(std::logic_error) { return 0; }
|
||||
int foo3() throw(E1) { return 0; }
|
||||
int foo4() throw(E2) { return 0; }
|
||||
// all the STL exceptions...
|
||||
void throw_bad_exception() throw(std::bad_exception) { throw std::bad_exception(); }
|
||||
void throw_domain_error() throw(std::domain_error) { throw std::domain_error("oops"); }
|
||||
void throw_exception() throw(std::exception) { throw std::exception(); }
|
||||
void throw_invalid_argument() throw(std::invalid_argument) { throw std::invalid_argument("oops"); }
|
||||
void throw_length_error() throw(std::length_error) { throw std::length_error("oops"); }
|
||||
void throw_logic_error() throw(std::logic_error) { throw std::logic_error("oops"); }
|
||||
void throw_out_of_range() throw(std::out_of_range) { throw std::out_of_range("oops"); }
|
||||
void throw_overflow_error() throw(std::overflow_error) { throw std::overflow_error("oops"); }
|
||||
void throw_range_error() throw(std::range_error) { throw std::range_error("oops"); }
|
||||
void throw_runtime_error() throw(std::runtime_error) { throw std::runtime_error("oops"); }
|
||||
void throw_underflow_error() throw(std::underflow_error) { throw std::underflow_error("oops"); }
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue