Programming with Python

⌘K
  1. Home
  2. Docs
  3. Programming with Python
  4. Files, Modules and Packag...
  5. Errors
  6. Exceptions

Exceptions

Anomalies that occur at runtime are known as exceptions

Exceptions are of two types,

  • Synchronous exceptions
  • Asynchronous exceptions

Synchronous exceptions

Synchronous exceptions are caused due to mistakes in the logic of the program and can be controlled

Examples

  • Divide by zero
  • Array index out of bounds

Asynchronous exceptions

 Asynchronous exceptions are caused due to hardware failure or operating system level failures and cannot be controlled

Examples

  • Out of memory error
  • Memory overflow
  • Memory underflow
  • Disk failure

Views: 0

How can we help?

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments