May you want to take a look at this (https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html)?
Throwables are serializable, and so you could get the message and parse it.
What editor do you use? You could parse after the expecting
, ''
and look at the double points. The first number (usually) declares the line, the second number the character.