KnowledgeBoat Logo
|

Computer Science

Define the following:

  1. Exception Handling
  2. Throwing an exception
  3. Catching an exception

Python Exception Handling

12 Likes

Answer

  1. Exception Handling — The process of writing additional code in a program to give proper messages or instructions to the user upon encountering an exception is known as exception handling.
  2. Throwing an exception — Throwing an exception refers to the process of creating an exception object and passing it to the runtime system or the appropriate exception handler.
  3. Catching an exception — Catching an exception refers to the process of executing a suitable handler or block of code specifically designed to handle that particular exception when it occurs during program execution.

Answered By

3 Likes


Related Questions