ArithmeticError เป็น base class ของ OverflowError, ZeroDivisionError, FloatingPointError
ตัวอย่าง
import sys
try:
7/0
except ArithmeticError as e:
print(e)
print(sys.exc_type)
print('This is an example of catching ArithmeticError')
ผลลัพธ์
integer division or modulo by zeroThis is an example of catching ArithmeticError