mirror of https://github.com/swig/swig
18 lines
333 B
OpenEdge ABL
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");
|
|
}
|
|
};
|
|
%}
|