First code analysis changes, this "should" make Greenshot more stable and implement things as is supposed.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2481 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-12 18:43:56 +00:00
commit a394904aa3
64 changed files with 514 additions and 343 deletions

View file

@ -131,7 +131,7 @@ namespace GreenshotImgurPlugin {
}
} catch (Exception ex) {
LOG.Error("Upload to imgur gave an exeption: ", ex);
throw ex;
throw;
}
} else {
OAuthSession oAuth = new OAuthSession(ImgurCredentials.CONSUMER_KEY, ImgurCredentials.CONSUMER_SECRET);
@ -160,7 +160,7 @@ namespace GreenshotImgurPlugin {
responseString = oAuth.MakeOAuthRequest(HTTPMethod.POST, "http://api.imgur.com/2/account/images.xml", uploadParameters, otherParameters, null);
} catch (Exception ex) {
LOG.Error("Upload to imgur gave an exeption: ", ex);
throw ex;
throw;
} finally {
if (oAuth.Token != null) {
config.ImgurToken = oAuth.Token;
@ -212,7 +212,7 @@ namespace GreenshotImgurPlugin {
return null;
}
}
throw wE;
throw;
}
LOG.Debug(responseString);
ImgurInfo imgurInfo = ImgurInfo.ParseResponse(responseString);
@ -243,7 +243,7 @@ namespace GreenshotImgurPlugin {
// Allow "Bad request" this means we already deleted it
if (wE.Status == WebExceptionStatus.ProtocolError) {
if (((HttpWebResponse)wE.Response).StatusCode != HttpStatusCode.BadRequest) {
throw wE;
throw ;
}
}
}