Troubleshooting in Java for when your Error Message is too Vague and nothing Useful Comes Up on Google
a little trick I learned in the service
So here’s some code, basically this is the boiler plate for catching an exception and printing the error message.
try {
// some code
} catch (Exception e) {
System.out.println(e.getMessage());
}
add an e.printStackTrace() to get a long call stack of the events leading up to the failure. This will leave a useful breadcrumb trail full of context…