In C/C++ the filename is returned by FILE and line number is returned by LINE. Java does have a getFileName(), but does not seem to have a corresponding getLineNumber(). It would be nice to be able to do something like this:
catch (Exception e) {
System.err.println(this.getFileName() + this.getLineNumber() + e.getMessage());
}
Is there a way to get the java file/line number?