Exception handling

This commit is contained in:
HeshamTB 2018-12-23 20:39:46 +03:00
parent 2e78d7ccfe
commit dbcdef9bf0
2 changed files with 16 additions and 9 deletions

View File

@ -143,6 +143,8 @@ namespace OWTrack
private void OWTrackFunc(bool state) => tr.settings.TrackOW = state; private void OWTrackFunc(bool state) => tr.settings.TrackOW = state;
private void update() private void update()
{
try
{ {
Wins.Text = tr.GetWins().ToString(); Wins.Text = tr.GetWins().ToString();
Losses.Text = tr.GetLosses().ToString(); Losses.Text = tr.GetLosses().ToString();
@ -155,6 +157,12 @@ namespace OWTrack
srTextBox.Text = null; srTextBox.Text = null;
saveManeger.SaveJSON(tr); saveManeger.SaveJSON(tr);
} }
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
private void AddMatch() private void AddMatch()
{ {

View File

@ -128,8 +128,7 @@ namespace OWTrack
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.Message); throw e;
return false;
} }
} }