@lapis hinge
#Error reading file
5 messages · Page 1 of 1 (latest)
@lapis hinge can you post the error message
its not an actual error message from the program but from the catch exception
} catch (IOException e) {
System.out.println("An error occurred while loading the data: " + e.getMessage());
Change it to e.printStackStrace();
Example:
//your code goes here
}catch(Exception e){
System.out.print("An error occurred while loading the data: ");
e.printStackTrace();
}
I used the System.out.print("") So that the error shows up on the same line
If you dont want to print the stack try doing something like:
try{
//your code goes here
}catch(Exception e){
System.out.println("An error occurred while loading the data: " + e.toString());
}```
I used ``e.toString()`` because it will just print out the exception itself and nothing else.