[Mono-list] C#/Mono Serial port communication

Jon-Eirik Pettersen lists@jonepet.net
Thu, 25 Nov 2004 01:02:02 +0100

George Birbilis wrote:
>>>> Unhandled Exception: System.NullReferenceException: Object reference 
>>>> not set to an instance of an object
>>> when catching the exception try also printing out a stack trace for 
>>> it (see the respective method available at the base Exception class 
>>> to get the trace, then print it out)
>>> --------------
>> It does not look like it is catching the exception. They just appears 
>> in the background, resulting that I don't know where they are thrown.
> I thought your code had try/catch and was just printing out the 
> exception object caught (instead of printing out the stack trace too). 
> Are you sure you're not catching those exceptions and just printing out 
> their message without the stack trace?
The exceptions appeared before I did insert the try/catch-blocks. I was 
trying to catch them using these blocks, but it did'nt work.