Catch exception if one occurrs during saving
This commit is contained in:
parent
c3f8759c70
commit
c45dbc5da1
@ -189,8 +189,15 @@ namespace BreCalClient
|
||||
esc.ShipcallModel.Shipcall?.Participants.Clear();
|
||||
foreach (ParticipantAssignment pa in esc.ShipcallModel.AssignedParticipants.Values)
|
||||
esc.ShipcallModel.Shipcall?.Participants.Add(pa);
|
||||
this._api.ShipcallsPost(esc.ShipcallModel.Shipcall); // save new ship call
|
||||
this.AddShipcall(esc.ShipcallModel);
|
||||
try
|
||||
{
|
||||
this._api.ShipcallsPost(esc.ShipcallModel.Shipcall); // save new ship call
|
||||
this.AddShipcall(esc.ShipcallModel);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
this.ShowErrorDialog(ex.ToString(), ex.Message);
|
||||
}
|
||||
|
||||
_refreshImmediately = true; // set flag to avoid timer loop termination
|
||||
_tokenSource.Cancel(); // force timer loop end
|
||||
|
||||
Reference in New Issue
Block a user