У меня есть следующий код скелета
try {
...
...
sysout("Please provide an input: ");
Thread.sleep(10000); //10 secs time given to the user to give the input. If the user doesn't enter the input it is throwing the exception, which is not being handled (with the custom message)
interact(); //This is a method that belongs to **expectj.Spawn** class
...
...
} catch (Exception e) {
System.out.println("You have not given any input!Please try again!");
}
Но я все еще получаю следующий вывод -
Exception in thread "ExpectJ Stream Piper" java.nio.channels.IllegalBlockingModeException
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:39)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:92)
at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86)
at java.io.InputStream.read(InputStream.java:85)
at expectj.StreamPiper.run(StreamPiper.java:134)
Есть ли еще какие-то исключения, которые мне нужно обработать?