|
Re: EnhancedIO Exception Error
Well, it's been a little while since I did Java, but I would guess that the getAnalogIn function can throw an exception, and it's not being handled. You either need a try block around it or you need to declare that it can throw the exception.
Solution 1 (in method):
try {
double slider = dseio.getAnalogIn(1);
//additional code to execute if that works
}
catch (IOException ioexec) {
//do stuff here if it goes wrong
}
(this last part may or may not be necessary; just know that it will always execute, even if an exception is thrown)
finally {
//more stuff that will always execute
}
Solution 2:
public void teleopPeriodic() throws EnhancedIOException {
double slider = dseio.getAnalogIn(1);
}
Solution 1 has much better control over what happens if an exception is thrown, so I suggest you use that one in your program. I hope it works for you.
|