Closed Robadob closed 8 years ago
Just tested this with a Motor/Touch Sensor/Color Sensor & Gyro Sensor.
It appears the Active devices (Color and Gyro) throw the exception, but passive ones (Motor and Touch) don't. So I'm not sure what the students error would have been.
Ramsay said this doesn't work.
It appears to be implemented at
Motor.java:290
, I may have done this under the assumption that it throws the sameIllegalArgumentException
that a sensor with invalid port throws (I saw this error in someone's console in the lab), so may need testing.Are you sure it was not that it prints out the explanation that the motor isn't connected right, followed by the stack trace, this may have confused the student?