swig/Examples/test-suite/catches_strings.i

18 lines
333 B
OpenEdge ABL

%module catches_strings
%include <std_string.i>
%catches(const char *) StringsThrower::charstring;
%catches(std::string) StringsThrower::stdstring;
%inline %{
struct StringsThrower {
static void charstring() {
throw "charstring message";
}
static void stdstring() {
throw std::string("stdstring message");
}
};
%}