No reviews yet.
JDK 1.4 provides a couple of powerful new Exceptions features -- chained exceptions and StackTraceElements.
Chained exceptions formalize the idea that one exception can trigger another. In this e-doc, you'll learn how they work, what they replace, and how to traverse a chain of exceptions.
StackTraceElements provide programmatic interface to stack traces, which are generated as part of an exception. This is a good deal more convenient than generating a stack trace dump and parsing the output. In this e-doc, you'll learn how to access and use StackTraceElements. You'll also learn how to create a StackTraceElement, and you'll learn when this is appropriate to do.
This e-doc will show you how to:
Sample programs included in this chapter: