In Java - how do I get a full stack trace

后端 未结 1 1837
轻奢々
轻奢々 2021-01-28 12:19

Currently I get the following output from code run

Caused by: java.lang.NullPointerException
    at com.gargoylesoftware.htmlunit.html.HtmlScript$2.execute(HtmlSc         


        
相关标签:
1条回答
  • 2021-01-28 12:46

    The "Caused by" means that this is a nested exception.

    The "... 30 more" in a nested exception stacktrace means that those 30 lines are the same as in the primary exception.

    So just look at the primary stacktrace to see those stack frames.


    Apparently your exception stacktraces are being generated in a way that is suppressing (or removing) the primary exception stacktrace. This is puzzling, but it is probably being done by one of the unit testing libraries that you are using.

    Getting to the bottom of this will probably involve you either debugging whatever it is that is generating the stacktrace, or writing a minimal reproducible example so that someone else can debug it.

    0 讨论(0)
提交回复
热议问题