PPT Slide
When to Use Exceptions:
Truly Exceptional Circumstances
public TreeNode getNode(int index)
{
TreeNode tempNode;
try {
tempNode =
myTree.getNodeRecursively(new TreeNode(index));
} // try
catch(StackOverflowError e) {
System.exit(1);
} // catch
return tempNode;
} // getNode
Or less obviously
Previous slide
Next slide
Back to first slide
View graphic version