I have 5 methods e.g. 1, 2, 3, 4, 5. I am calling method2 from method1, method 3 from method2 and so on. Suppose an exception happens in Method5 and I am handling it in the try-catch block, how will I know this in Method1?
Share
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’ll have to set a variable/flag that both method1 and method5 have access to. Something like a field in the same class should work.