I have a base class, and I would like to catch all exceptions of the derived class within the base class, is this possible?
You won’t know what the methods are from the derived class.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to provide more details about your specific scenario. However if for example you have a base abstract class that provides a contract and you want to catch all possible exceptions thrown by derived classes when calling the base class contract you can do something like this: