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:
commit
f6d10278f8
15 changed files with 102 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue