mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Rollback of previous change, only needed to throw the right exception.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1936 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
c6d2350d94
commit
715d06842e
1 changed files with 2 additions and 2 deletions
|
@ -294,14 +294,14 @@ namespace Jira {
|
|||
try {
|
||||
string base64String = Convert.ToBase64String(buffer, Base64FormattingOptions.InsertLineBreaks);
|
||||
jira.addBase64EncodedAttachmentsToIssue(credentials, issueKey, new string[] { filename }, new string[] { base64String });
|
||||
} catch (Exception ex1) {
|
||||
} catch (ArgumentException ex1) {
|
||||
LOG.WarnFormat("Failed to upload by using method addBase64EncodedAttachmentsToIssue, error was {0}", ex1.Message);
|
||||
try {
|
||||
LOG.Warn("Trying addAttachmentsToIssue instead");
|
||||
jira.addAttachmentsToIssue(credentials, issueKey, new string[] { filename }, (sbyte[]) (Array)buffer);
|
||||
} catch (Exception ex2) {
|
||||
LOG.WarnFormat("Failed to use alternative method, error was: {0}", ex2.Message);
|
||||
throw ex1;
|
||||
throw ex2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue