daltoncabrera / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

Example considers the UnauthorizedException that no longer used #292

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was tracing the example code and found that an exception — 
UnauthorizedException — was used by the example while there isn't any usage 
of that exception in the MSNPSharp library.

I searched the code history and found that it was thrown by Passport account 
authentication, which was removed from 

    trunk/MSNP-Sharp15/MSNPSharp/NS15MessageHandler.cs (r.284)

long ago.

Should it be removed from the example code? 
Or should I still check that exception when using MSNPSharp to write a Live 
Messenger client?

Thank you beforehand.

Original issue reported on code.google.com by hansbo...@gmail.com on 7 Sep 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Thanks for the report. It is replaced by Nameserver.AuthenticationError event.

Original comment by hepha...@gmail.com on 7 Sep 2011 at 6:24

GoogleCodeExporter commented 9 years ago
Hi, thank you for the quick fix and reply. I have another question 
about events though.

Since I'm trying to write a Live Messenger client, my program should 
solve as many exceptions as possible (without bothering the users), 
such as auto-reconnection when unexpected disconnection happens.

It seems that MSNPSharp relies quite much on event/exception handling.
Some event are self-explained, like Nameserver.AuthenticationError and 
NameserverProcessor.ConnectionEstablished. However there are some 
ambiguous events, e.g. Nameserver.ExceptionOccurred. I have no idea 
how to handle this event.

Is there any keyword/document about all the events/exceptions? Or
should I leave the problem unhandled to the users?

Thank you again. Happy Moon Festival.

Original comment by hansbo...@gmail.com on 14 Sep 2011 at 8:33

GoogleCodeExporter commented 9 years ago
The ExceptionOccurred is basically telling exceptions we don't know either, you 
should treat these exception as internal exception, not showing them to the 
user.

Original comment by freezing...@gmail.com on 20 Sep 2011 at 2:45

GoogleCodeExporter commented 9 years ago
ok. I see. Thank you!

Original comment by hansbo...@gmail.com on 26 Sep 2011 at 10:06