Re: WaitFor and TimeoutException (General questions)
Mostly I wanted to make sure that the TimeoutException was expected as a result of the WaitFor timing out. I had previously only encountered this exception when not sending or receiving any data within the amount of time specified by [SSH].Timeout.
Then once I received that TimeoutException from WaitFor I was unable to do a Receive() on the SSH object to find out what data had been received that did not match the pattern I had placed in WaitFor... It also just triggered another TimeoutException... and since I didn't think Receive (the overload without an int parameter) would throw a TimeoutException it was a bit confusing.
I resolved the issue by setting a breakpoint and checking the returned text before calling WaitFor, then updating my pattern appropriately.
It would be nice if the documentation would list what exceptions each method can potentially raise the same way Microsoft did with the documentation of the Base Class Library.
Complete thread:
- WaitFor and TimeoutException - Scott Blomfield, 2005-12-20, 19:49
- Re: WaitFor and TimeoutException - Scott Blomfield, 2005-12-20, 19:51
- Re: WaitFor and TimeoutException - wodSupport, 2005-12-20, 20:14
- Re: WaitFor and TimeoutException - Scott Blomfield, 2005-12-21, 21:10
- Re: WaitFor and TimeoutException - wodSupport, 2005-12-20, 20:14
- Re: WaitFor and TimeoutException - Scott Blomfield, 2005-12-20, 19:51