On Jan 25, 2:09 pm, "Daimler" <daimle...@yahoo.com.sg> wrote:
> i am using visual c++ 2005 clr window form with
>
> try and catch a serial port readline.
>
> the codes are as follows: -
>
> try{
>
> Form1::textBox1->Text = Form1::serialPort1->ReadLine();
>
> }catch(Exception* e){ throw;}
>
> ------------------------------------------------------------------------------------------
>
> the debug generate an error.
>
> what is wrong?
Most probably the ReadLine() fails and trows an error that your catch
will catch
but there it gets retrown and probably no other catch exists so an
uncaught exeption
exists and your debugger will tell you this is an error.
If this is not the case, I advise you to take your problem to an MS
related
newsgroup, they will understand better what the ReadLine() and other
elements
of your code are doing, we only talk about 'pure' C++ here.
Good luck,
Bas
|