In some languages it is possible to get the column number of a line in a stacktrace, however in Java we only have line numbers.
To give you an example, in another language we can have:
Error
at <anonymous>:2:2
at Object.InjectedScript._evaluateOn (<anonymous>:641:39)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:580:52)
at Object.InjectedScript.evaluate (<anonymous>:495:21)"
Although this might be a bad example as I'm causing the error from the browser console, you can see the column numbers which is really helpful in solving errors.
To give you the example in Java ( Yes, names were changed ) :
Caused by: java.lang.IllegalArgumentException: path was null
at org.jboss.resteasy.specimpl.ResteasyUriBuilder.path(ResteasyUriBuilder.java:362)
at enterprise.money.service(AbstractSomething.java:88)
This leads to line 88
which contains
URI uri = uriInfo.getBaseUriBuilder().path(objectA).path(objectB).build();
With the stacktrace I have I can't check which .path
call caused the exception. So my question is, are there any solutions that allow me to get the reference of the column?
( To guard from some possible alternative answers, we need a solution to get the column numbers, other answers like how to step through the debugger or refactoring every builder pattern, etc., will not answer the question )