Exception handling
This commit is contained in:
		
							parent
							
								
									2e78d7ccfe
								
							
						
					
					
						commit
						dbcdef9bf0
					
				@ -144,16 +144,24 @@ namespace OWTrack
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        private void update()
 | 
					        private void update()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            Wins.Text = tr.GetWins().ToString();
 | 
					            try
 | 
				
			||||||
            Losses.Text = tr.GetLosses().ToString();
 | 
					 | 
				
			||||||
            if (tr.newSR == 0)
 | 
					 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                if (tr.srDiff() < 1) { srLabel.Text = tr.startSR.ToString() + " - 0"; }
 | 
					                Wins.Text = tr.GetWins().ToString();
 | 
				
			||||||
 | 
					                Losses.Text = tr.GetLosses().ToString();
 | 
				
			||||||
 | 
					                if (tr.newSR == 0)
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    if (tr.srDiff() < 1) { srLabel.Text = tr.startSR.ToString() + " - 0"; }
 | 
				
			||||||
 | 
					                    else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
 | 
					                else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
 | 
				
			||||||
 | 
					                srTextBox.Text = null;
 | 
				
			||||||
 | 
					                saveManeger.SaveJSON(tr);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else srLabel.Text = tr.startSR.ToString() + " - " + tr.srDiff();
 | 
					            catch (Exception e)
 | 
				
			||||||
            srTextBox.Text = null;
 | 
					            {
 | 
				
			||||||
            saveManeger.SaveJSON(tr);
 | 
					                MessageBox.Show(e.Message);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private void AddMatch()
 | 
					        private void AddMatch()
 | 
				
			||||||
 | 
				
			|||||||
@ -128,8 +128,7 @@ namespace OWTrack
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            catch (Exception e)
 | 
					            catch (Exception e)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                MessageBox.Show(e.Message);
 | 
					                throw e;
 | 
				
			||||||
                return false;
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user