PCAP • Practice Test 4 — 25 Questions
Free PCAP practice test 4 — 25 questions with explanations. No signup required.
Refer to the exhibit. The above log shows an unhandled exception that caused the program to crash. The developer wants to handle this exception and log the error without crashing. Which exception type should be caught in the main code to capture this specific error?
2025-04-01 10:23:45 ERROR root: Unhandled exception
Traceback (most recent call last):
File "process.py", line 15, in <module>
process_data()
File "process.py", line 7, in process_data
raise ValueError('Invalid value')
ValueError: Invalid value