swig/Lib/perl5/perlerrors.swg
Robert Stone e7a4f42877 perl5 error handling improvements
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-10 18:33:04 +00:00

34 lines
871 B
Text

/* -----------------------------------------------------------------------------
* error manipulation
* ----------------------------------------------------------------------------- */
SWIGINTERN const char*
SWIG_Perl_ErrorType(int code) {
switch(code) {
case SWIG_MemoryError:
return "MemoryError";
case SWIG_IOError:
return "IOError";
case SWIG_RuntimeError:
return "RuntimeError";
case SWIG_IndexError:
return "IndexError";
case SWIG_TypeError:
return "TypeError";
case SWIG_DivisionByZero:
return "ZeroDivisionError";
case SWIG_OverflowError:
return "OverflowError";
case SWIG_SyntaxError:
return "SyntaxError";
case SWIG_ValueError:
return "ValueError";
case SWIG_SystemError:
return "SystemError";
case SWIG_AttributeError:
return "AttributeError";
default:
return "RuntimeError";
}
}