I have a several nested methods in my program. If a deeply nested method errors out in my try block how do i stop further execution and print the error to the console?
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.
Not sure whether I’m understanding your question correctly…
But if you don’t want to handle it in the deeper-down code, then don’t catch it (or catch it and re-throw it again).
Exceptions travel up the call stack until something catches them.