public TwitterErrorItem[] Errors
=> this.ErrorResponse != null ? this.ErrorResponse.Errors : Array.Empty<TwitterErrorItem>();
+ public string[] LongMessages
+ => this.Errors.Select(x => x.Message).ToArray();
+
public TwitterApiException()
{
}
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
+using OpenTween.Api;
using OpenTween.Connection;
using OpenTween.Setting.Panel;
using OpenTween.Thumbnail;
"Authenticate",
MessageBoxButtons.OK);
}
- catch (WebApiException ex)
+ catch (TwitterApiException ex)
{
- var message = Properties.Resources.AuthorizeButton_Click2 + Environment.NewLine + ex.Message;
+ var message = Properties.Resources.AuthorizeButton_Click2 + Environment.NewLine +
+ string.Join(Environment.NewLine, ex.LongMessages);
+
MessageBox.Show(this, message, "Authenticate", MessageBoxButtons.OK);
}
}