Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Tweet using specific credentials

$
0
0
Hi,

The ExceptionHandler logs all the Web Exceptions during the application lifecycle. Therefore you can access all the Exceptions coming from Twitter.
When implementing 0.9 I wanted to have developers never do Try/Catch to an extent that Tweetinvi never throw any exception in the current version. If arguments are effectively invalid or a webexception is thrown form Twitter, the result will be null.

With the benefit of hindsight I think it was not a wise decision.
For next release (0.9.1) I will try to change this to follow this behavior.

If a WebException is Thrown -> ExceptionHander registers the WebException and the result is null (does not throw exception).
If an Argument is invalid (e.g. null) an exception will be Thrown.

Consequently in next version the user will be able to differentiate a WebException from an exception created because he did some code wrong.

by null tweet you mean a tweet without text for exemple ?
By null I mean the returned result is null.

It should raise a ArgumentNullException, no ?
As I've just explained, it won't but I think it should be.

Have you planed in the exception management, to retrieve exceptions not from "GetLast", like throwing custom exceptions, or filling the tweet object whit the exception ?
As explained, yes you already can do that.

Please feel free to ask any other question concerning this subject. I think Exception management for exception oustide of WebException is not good in the current version and I'll work hard to improve this.

Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>