ไม่ใช่ทั้งหมด บางอย่างเป็น Syntax Errors
ตัวอย่าง Syntax Error
if True
print("hello")
else:
print("world")
ผลลัพธ์
SyntaxError: invalid syntax
การจัดกลุ่ม Errors
- Syntax errors - พบตอน parse โปรแกรม ยังไม่รัน
- Runtime errors - พบตอน execute (ZeroDivisionError, TypeError, etc.)
- Logical errors - โปรแกรมรันได้แต่ผลผิด
Runtime errors ตัวอย่าง: division by zero, incompatible types, undefined identifier, index/key/attribute not found, file not found