mirror of
https://github.com/NicolasConstant/BirdsiteLive
synced 2025-06-05 21:49:16 +02:00
throw exception instead of returning null
This commit is contained in:
@@ -35,7 +35,7 @@ namespace BirdsiteLive.Twitter
|
|||||||
public TwitterUser GetUser(string username)
|
public TwitterUser GetUser(string username)
|
||||||
{
|
{
|
||||||
//Check if API is saturated
|
//Check if API is saturated
|
||||||
if (IsUserApiRateLimited()) return null;
|
if (IsUserApiRateLimited()) throw new RateLimitExceededException();
|
||||||
|
|
||||||
//Proceed to account retrieval
|
//Proceed to account retrieval
|
||||||
_twitterAuthenticationInitializer.EnsureAuthenticationIsInitialized();
|
_twitterAuthenticationInitializer.EnsureAuthenticationIsInitialized();
|
||||||
|
Reference in New Issue
Block a user