I have a method that need to try to update my twitter status. I will send a lot of messages and I want to continue if some message throw a error.
Today I catch everything, but I dont like. Maybe should I put this catch at the caller? Or return exception instead bool?
public bool RefreshStatus(string status, out Status newStatus)
{
try
{
newStatus = twitterContext.UpdateStatus(status);
return true;
}
catch
{
newStatus = null;
return false;
}
}
I call this method inside a for. I see method like Int32.TryParse and they dont do this, just ignore validations(I don´t have in this case)