Example #1
0
 private void OnSaving(object sender, SavingEventArgs e)
 {
     try
     {
         ConvertDirtyFarmAnimals.OnSaving(e);
     }
     catch (KeyNotFoundException ex)
     {
         HandleKeyNotFoundException(ex);
     }
 }
Example #2
0
        private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
        {
            try
            {
                IntegrateWithJsonAssets.RefreshFarmAnimalData(Helper);
            }
            catch (ApiNotFoundException ex)
            {
                Monitor.Log("Cannot refresh farm animal data: " + ex.Message);
            }
            catch (SaveNotLoadedException ex)
            {
                Monitor.Log("Cannot refresh farm animal data: " + ex.Message);
            }

            try
            {
                ConvertDirtyFarmAnimals.OnSaveLoaded(e);
            }
            catch (KeyNotFoundException ex)
            {
                HandleKeyNotFoundException(ex);
            }
        }