November 2017
Intermediate to advanced
398 pages
10h 14m
English
The traditional reading of the stack trace, using objects of the java.lang.Thread and java.lang.Throwable classes, was accomplished by capturing it from the standard output. For example, we can include this line in any section of the code:
Thread.currentThread().dumpStack();
The previous line will produce the following output:

Similarly, we can include this line in the code:
new Throwable().printStackTrace();
The output will then look like this:

This output can be captured, read, and analyzed programmatically, but ...
Read now
Unlock full access