S
Serguei.Goumeniouk
Dear Experts,
I have a strange problem in the following codes:
1 try {
2 // Some declarations
3 try {
4 // Some codes, which run out of memory
5 } catch (Exception ex) {
6 // Printout A
7 }
8 } catch (OutOfMemoryError ex) {
9 // Printout B
10 }
My program runs out of memory inside the inner try/catch block (at line
#4). In this case IMHO it should be the printout A to be activated, but
in reality I have the printout B. Does this behavior violate the
precedence of try blocks?
Regards,
Serguei.
I have a strange problem in the following codes:
1 try {
2 // Some declarations
3 try {
4 // Some codes, which run out of memory
5 } catch (Exception ex) {
6 // Printout A
7 }
8 } catch (OutOfMemoryError ex) {
9 // Printout B
10 }
My program runs out of memory inside the inner try/catch block (at line
#4). In this case IMHO it should be the printout A to be activated, but
in reality I have the printout B. Does this behavior violate the
precedence of try blocks?
Regards,
Serguei.