Why does it seem unreliable?
Because I've found about 5 major problems with it, so far, and it is
unreliable. I can't rely on it working properly. :)
By your own admission, an index was out of
range, and an exception was thrown. Also, without seeing any of the code,
it's impossible to say if you were making the calls correctly or not.
Yes, usually it's my fault. But, this time I'm just calling
WebBrowser.Document.Write() to append text to it, over and over, as
I've been doing the past month. This was the first time this
exception was thrown. Oh, and I am asking it to scroll to the bottom
and refresh after each write.
You mention an index (of what I have no clue) being out of range. You
shouldn't be relying on an exception being thrown to tell you this. You
should be performing bounds checking yourself.
The exception and innerexception was all inside of the Write() call,
all within the WebBrowser control. This is the culprit:
System.Windows.Forms.UnsafeNativeMethods.IHTMLDocu ment2.Write()
Whoever wrote that code didn't check the bounds.
Regardless, I now catch this exception and do nothing with it, since
what can I do? I'm phasing out the usage of WebBrowser. It just
amazes me how much is wrong with it. But, it is a web browser, after
all, so it is quite complex... I wouldn't want to write it.
Zytan