remove unused warnings with gcc -Wall
Add sanity check back in checking that the pending exception count is zero per thread git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8946 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a5c816aa71
commit
fb644e707e
1 changed files with 4 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
|
|||
{ SWIG_CSharpArgumentOutOfRangeException, NULL },
|
||||
};
|
||||
|
||||
static void SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
|
||||
static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
|
||||
SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
|
||||
if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
|
||||
callback = SWIG_csharp_exceptions[code].callback;
|
||||
|
|
@ -72,7 +72,7 @@ static void SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const
|
|||
callback(msg);
|
||||
}
|
||||
|
||||
static void SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
|
||||
static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
|
||||
SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
|
||||
if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
|
||||
callback = SWIG_csharp_exceptions_argument[code].callback;
|
||||
|
|
@ -244,6 +244,8 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
}
|
||||
|
||||
public static void Set(Exception e) {
|
||||
if (pendingException != null)
|
||||
throw new ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
|
||||
pendingException = e;
|
||||
lock(typeof($imclassname)) {
|
||||
numExceptionsPending++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue