Question OOP-EXC-0020
HardWhich is the best practice when catching exceptions?
- A.
Use exceptions for normal control flow
- B.
Wrap every line in its own try block
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Exception Handling question
Which is the best practice when catching exceptions?
Use exceptions for normal control flow
Wrap every line in its own try block
Sign up free to see the answer and a step-by-step explanation.
Catch specific exceptions you can handle and let others propagate
Always catch Exception and ignore it