Merge branch 'yag00-master'

* yag00-master:
  Add raise methods for throwing c++ exceptions in C#, Java, D
  php5: propagate c++11 noexcept to director classes
  Revert "java : noexcept method can't raise Swig::DirectorException"
  Revert "csharp : noexcept method can't raise Swig::DirectorPureVirtualException"
  csharp : noexcept method can't raise Swig::DirectorPureVirtualException
  java : noexcept method can't raise Swig::DirectorException
  #526 : propagate c++11 noexcept to director classes
  #526 : propagate c++11 noexcept to director classes test case
This commit is contained in:
William S Fulton 2017-05-13 17:05:25 +01:00
commit f6d10278f8
15 changed files with 102 additions and 10 deletions

View file

@ -41,6 +41,10 @@ namespace Swig {
public:
DirectorPureVirtualException(const char *msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) {
}
static void raise(const char *msg) {
throw DirectorPureVirtualException(msg);
}
};
}

View file

@ -40,6 +40,10 @@ namespace Swig {
public:
DirectorPureVirtualException(const char *msg) : DirectorException(std::string("Attempted to invoke pure virtual method ") + msg) {
}
static void raise(const char *msg) {
throw DirectorPureVirtualException(msg);
}
};
}

View file

@ -356,6 +356,10 @@ namespace Swig {
}
}
static void raise(JNIEnv *jenv, jthrowable throwable) {
throw DirectorException(jenv, throwable);
}
private:
static char *copypath(const char *srcmsg) {
char *target = copystr(srcmsg);