Why is chained exception used? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is chained exception used?

Is chained exception is another method of throwing exception manually. If yes, then can you explain me where it is mostly used

1st Feb 2017, 11:42 AM
Ratnadeep Dey
Ratnadeep Dey - avatar
1 Answer
+ 2
if the exception generated must be informed to the parent class we use chaining by throw keyword so that super class can also know some exception generated in its child.
1st Feb 2017, 1:11 PM
Pavan Kumar T S
Pavan Kumar T S - avatar