← Quiz: Error Handling and Debugging: all 10 questions
Quiz: Error Handling and Debugging · Question 6 of 10
In a catch block, you get an error your code does not know how to handle. What should you do?
In a catch block, you get an error your code does not know how to handle. What should you do?
- A.Ignore it silently
- B.Re-throw it so a higher level can handle or report it
- C.Reload the page
- D.Convert it to a string and return it
Answer & explanation
Correct answer: Re-throw it so a higher level can handle or report it
Swallowing unknown errors hides real bugs.
Can you get the rest right without peeking?
Take the timed Quiz: Error Handling and Debugging quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →