So if I call
public void throwException throws Exception { throw new Exception("foo") ; }
the output will look something like this:
java.lang.Exception: foo at SomeClass.throwException(SomeClass.java:5) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ...
now if i click on (SomeClass.java:5)
, the IDE will go to the 5th line in SomeClass.java.
Is it possible to manually create these hyperlinks using System.out or throwing an exception? I already tried to manipulate the Exception by modifying the StackTraceElement, but it seems to work only with valid Java classes.
I am working on a project where I have to parse a uniquely defined file and would like to print hyperlinks that directly lead to the file, instead of the parsing method where the problem occurred.
source share