What’s the difference between those three, and how shall I end program in case of exception which I can’t handle properly?
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.
My advice would be not to use any of them. Instead,
catchthe exceptions you can’t handle inmain()and simplyreturnfrom there. This means that you are guaranteed that stack unwinding happens correctly and all destructors are called. In other words: