H
harryos
hi,
while going through the java tutorial on Exceptions ,I came across a
picture of call stack.
http://download.oracle.com/javase/tutorial/essential/exceptions/definition.html
In this figure,the called method is shown at the top and caller is at
bottom.I thought if method A calls B and B calls C,then call stack
should be like-
main
A
B
C
Which one is correct?
Also in the same tutorial ,on page
http://download.oracle.com/javase/tutorial/essential/exceptions/declaring.html
,there is a statement
'Sometimes, it's appropriate for code to catch exceptions that can
occur within it. In other cases, however, it's better to let a method
further up the call stack handle the exception'
Is that not contradictory to what was given in the picture?
regards,
harry
while going through the java tutorial on Exceptions ,I came across a
picture of call stack.
http://download.oracle.com/javase/tutorial/essential/exceptions/definition.html
In this figure,the called method is shown at the top and caller is at
bottom.I thought if method A calls B and B calls C,then call stack
should be like-
main
A
B
C
Which one is correct?
Also in the same tutorial ,on page
http://download.oracle.com/javase/tutorial/essential/exceptions/declaring.html
,there is a statement
'Sometimes, it's appropriate for code to catch exceptions that can
occur within it. In other cases, however, it's better to let a method
further up the call stack handle the exception'
Is that not contradictory to what was given in the picture?
regards,
harry