search

Home  >  Q&A  >  body text

exception - How to quickly capture the error point of the exception stack information thrown by Java?

Do you have any good methods to quickly locate abnormal information?

Caused By of java: Is the following exception the point of error?

过去多啦不再A梦过去多啦不再A梦2728 days ago1090

reply all(2)I'll reply

  • 黄舟

    黄舟2017-06-30 09:55:57

    My habit is: from top to bottom, look for the first class or method written by myself.

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-30 09:55:57

    Java's exception stack is from the inside out, which means that the top one is the point where the exception is thrown. So just watch the first one. Generally, the exception name will be written first, followed by the exception content, for example:
    java.lang.NullPointerException: your variable is null.
    at com.kris.test.Test.main() 26 line.
    ....

    So just look at the first one above.

    reply
    0
  • Cancelreply