aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/catches_strings.i
blob: 818a622853c2b91f8f52055b80d35f7a85353dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%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");
  }
};
%}