directorthrows warning fixes

- Fix line number display - now the usual simpler warning message can be displayed
for WARN_TYPEMAP_DIRECTORTHROWS_UNDEF - it still points to the problem method.
- Use macro names for warning suppression in test.
This commit is contained in:
William S Fulton 2013-10-24 07:45:56 +01:00
commit fc13a24ecb
3 changed files with 15 additions and 14 deletions

View file

@ -2,6 +2,8 @@
%include <std_except.i>
%warnfilter(SWIGWARN_TYPEMAP_DIRECTORTHROWS_UNDEF) MyNS::Foo::directorthrows_warning;
%{
#if defined(_MSC_VER)
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
@ -178,6 +180,7 @@ public:
virtual std::string ping(int excp) throw(int,MyNS::Exception2) = 0;
virtual std::string pong(int excp) /* throws MyNS::Exception1 MyNS::Exception2 MyNS::Unexpected) */ = 0;
virtual std::string genericpong(int excp) /* unspecified throws - exception is always DirectorException in C++, translated back to whatever thrown in java */ = 0;
virtual std::string directorthrows_warning(int excp) throw(double) {}
};
// Make a bar from a foo, so a call to Java Bar

View file

@ -6,7 +6,7 @@
// When using namespaces with no -package, must put JNI classes into a namespace
%pragma(java) jniclasspackage=%{MyNS_JNI%}
%warnfilter(826);
%warnfilter(SWIGWARN_JAVA_NSPACE_WITHOUT_PACKAGE);
%{
#if defined(_MSC_VER)