1/* ----------------------------------------------------------------------------- 2 * error manipulation 3 * ----------------------------------------------------------------------------- */ 4 5SWIGINTERN const char* 6SWIG_Perl_ErrorType(int code) { 7 const char* type = 0; 8 switch(code) { 9 case SWIG_MemoryError: 10 type = "MemoryError"; 11 break; 12 case SWIG_IOError: 13 type = "IOError"; 14 break; 15 case SWIG_RuntimeError: 16 type = "RuntimeError"; 17 break; 18 case SWIG_IndexError: 19 type = "IndexError"; 20 break; 21 case SWIG_TypeError: 22 type = "TypeError"; 23 break; 24 case SWIG_DivisionByZero: 25 type = "ZeroDivisionError"; 26 break; 27 case SWIG_OverflowError: 28 type = "OverflowError"; 29 break; 30 case SWIG_SyntaxError: 31 type = "SyntaxError"; 32 break; 33 case SWIG_ValueError: 34 type = "ValueError"; 35 break; 36 case SWIG_SystemError: 37 type = "SystemError"; 38 break; 39 case SWIG_AttributeError: 40 type = "AttributeError"; 41 break; 42 default: 43 type = "RuntimeError"; 44 } 45 return type; 46} 47 48 49 50