logging most communication exceptions
This commit is contained in:
parent
d61d207fb8
commit
ef2ddd16bf
6 changed files with 80 additions and 40 deletions
|
@ -65,25 +65,28 @@ namespace Sledgemapper
|
|||
|
||||
private async Task OnHubDisconnected(Exception arg)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub disconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
|
||||
_mainWidget.lblConnectionStatus.Text = "Disconnected";
|
||||
await Task.Yield();
|
||||
}
|
||||
|
||||
private async Task OnHubReconnecting(Exception arg)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Reconnecting Hub", Type = "SignalR Client Events", Source = _settings.MachineName });
|
||||
_mainWidget.lblConnectionStatus.Text = "Reconnecting";
|
||||
await Task.Yield();
|
||||
}
|
||||
|
||||
private async Task OnHubReconnected(string arg)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Hub reconnected", Type = "SignalR Client Events", Source = _settings.MachineName });
|
||||
_mainWidget.lblConnectionStatus.Text = "Connected";
|
||||
await Task.Yield();
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Initialize", Type = "AppLifecycle", Source = "Fuel System" });
|
||||
ExceptionlessClient.Default.SubmitEvent(new Event { Message = "Initialize", Type = "AppLifecycle", Source = _settings.MachineName });
|
||||
IsMouseVisible = true;
|
||||
Window.AllowUserResizing = true;
|
||||
base.Initialize();
|
||||
|
@ -894,7 +897,7 @@ namespace Sledgemapper
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
ExceptionlessClient.Default.SubmitException(ex);
|
||||
}
|
||||
|
||||
if (successful)
|
||||
|
@ -1009,11 +1012,13 @@ namespace Sledgemapper
|
|||
}
|
||||
catch (Refit.ApiException refitException)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitException(refitException);
|
||||
localContent.LblLoginError.Text = refitException.Content;
|
||||
localContent.LblLoginError.Visible = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitException(ex);
|
||||
localContent.LblLoginError.Text = "Can't connect to the server";
|
||||
localContent.LblLoginError.Visible = true;
|
||||
Debug.Write(ex);
|
||||
|
@ -1096,11 +1101,13 @@ namespace Sledgemapper
|
|||
}
|
||||
catch (Refit.ApiException refitException)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitException(refitException);
|
||||
localContent.LblLoginError.Text = refitException.Content;
|
||||
localContent.LblLoginError.Visible = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ExceptionlessClient.Default.SubmitException(ex);
|
||||
localContent.LblLoginError.Text = "Can't connect to the server";
|
||||
localContent.LblLoginError.Visible = true;
|
||||
Debug.Write(ex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue