Exception handling should be added to the handling of all io streams. This is because there is an unexpected problem in the transmission of io stream, which leads to the failure of io transmission, for example, your network cable is broken. . . It's special. Just give it a try.
Try {
string = in . readline();
}
Capture (exception e)
{
e . printstacktrace();
}