def _check_ovf(op, catch_arithmexic_exception=False): mapping = [('[mscorlib]System.OverflowException', 'exceptions.OverflowError')] if catch_arithmexic_exception: mapping.append(('[mscorlib]System.ArithmeticException', 'exceptions.OverflowError')) return [MapException(op, mapping)]
def _check_ovf_zer(op): mapping = [ ('[mscorlib]System.OverflowException', 'exceptions.OverflowError'), ('[mscorlib]System.DivideByZeroException', 'exceptions.ZeroDivisionError'), ('[mscorlib]System.ArithmeticException', 'exceptions.OverflowError') ] return [MapException(op, mapping)]
def _check_zer(op): mapping = [('[mscorlib]System.DivideByZeroException', 'exceptions.ZeroDivisionError')] return [MapException(op, mapping)]
def _check_ovf(op): mapping = [('[mscorlib]System.OverflowException', 'exceptions.OverflowError')] return [MapException(op, mapping)]