public Prediction Run(Area predictionArea, int predictionPointSpacing, DateTime startTime, DateTime endTime, string predictionName, bool newRun) { Prediction prediction = null; try { PredictionArea = predictionArea; prediction = new Prediction(this, newRun, predictionName, predictionArea, predictionPointSpacing, startTime, endTime, true); Run(prediction); prediction.Done = true; return(prediction); } catch (Exception ex) { Console.Out.WriteLine("An error occurred while running prediction: " + ex.Message + Environment.NewLine + ex.StackTrace); try { prediction.Delete(); } catch (Exception ex2) { Console.Out.WriteLine("Failed to delete prediction: " + ex2.Message); } throw ex; } }
public Prediction Run(Area predictionArea, int predictionPointSpacing, DateTime startTime, DateTime endTime, string predictionName, bool newRun) { Prediction prediction = null; try { PredictionArea = predictionArea; prediction = new Prediction(this, newRun, predictionName, predictionArea, predictionPointSpacing, startTime, endTime, true); Run(prediction); prediction.Done = true; return prediction; } catch (Exception ex) { Console.Out.WriteLine("An error occurred while running prediction: " + ex.Message + Environment.NewLine + ex.StackTrace); try { prediction.Delete(); } catch (Exception ex2) { Console.Out.WriteLine("Failed to delete prediction: " + ex2.Message); } throw ex; } }