You may want to use the printStackTrace method to print a record of the calls leading to the error.
printStackTrace
catch (IOException e) { e.printStackTrace(); }