#Error reading file

5 messages · Page 1 of 1 (latest)

sterile copperBOT
#

@lapis hinge

kmusial46 Uploaded Some Code
Uploaded these files to a Gist
woven comet
#

@lapis hinge can you post the error message

lapis hinge
#

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());

lethal trout
#

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.