Question
When is it appropriate to pass a cause to an exception's constructor?
- A. Always
- B. When the exception is being thrown in response to catching of a different exception type
- C. When the exception is being thrown from a public method
- D. When the exception is being thrown from a private method
B.
Note
Exception chaining is appropriate when an exception is being thrown in response to catching a different exception type.
PreviousNextRelated