In Jenkins pipeline build, sometimes I've seen null pointer or other
exceptions like -
java.lang.NullPointerException: Cannot invoke method trim() on null
object
Generally if we run Java program through IDE or command line, if an
exception occurs we see at which line number the exception has occurred.
But with Jenkins build output console, it does not show the line number
where the exception has occurred.
In this case, based on method name ie `trim()` from log, I check wherever
`trim()` method is used. But as I've used it at multiple places in same
method, it becomes difficult to identify exactly where error has occurred.
Another way is to add echo statements and re-run build and see where it
gives this exception but this is time consuming.
Is there any better way/plugin using which I can identify at which line of
pipeline code exception has occurred?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/de0645e5-6edb-4d52-ae0d-03c2667fb3b6o%40googlegroups.com.