Python_Institute
PCAP-31-03 · Question #87
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
The correct answer is C. except Exception as e. See the full explanation below for the reasoning.
Question
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
Options
- Aexcept Exception(e):
- Bexcept e=Exception:
- Cexcept Exception as e:
- Dsuch an action is not possible in Python
How the community answered
(57 responses)- A5% (3)
- B9% (5)
- C84% (48)
- D2% (1)
Community Discussion
No community discussion yet for this question.