Hi,
I just thought of something kind of scary, so I was wondering if anyone knows the answer.
I know in C++, if you're in a destructor because an exception was thrown and then you throw another exception, the program immediately calls the std::terminate() function and ends.
I'm wondering if the same kind of thing would happen in Java if you throw an exception from a try block and then throw another exception in a finally block? You would essentially have 2 exceptions in the air at the same time...
I just thought of something kind of scary, so I was wondering if anyone knows the answer.
I know in C++, if you're in a destructor because an exception was thrown and then you throw another exception, the program immediately calls the std::terminate() function and ends.
I'm wondering if the same kind of thing would happen in Java if you throw an exception from a try block and then throw another exception in a finally block? You would essentially have 2 exceptions in the air at the same time...