This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch support-deseason
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/support-deseason by this push:
     new d76a16d  Error handling
d76a16d is described below

commit d76a16d7150407d63c96d10813025c6dc63ff5a8
Author: Eamon Ford <[email protected]>
AuthorDate: Tue Oct 13 13:40:29 2020 -0700

    Error handling
---
 analysis/webservice/algorithms_spark/TimeSeriesSpark.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/analysis/webservice/algorithms_spark/TimeSeriesSpark.py 
b/analysis/webservice/algorithms_spark/TimeSeriesSpark.py
index 079143b..4ca8f88 100644
--- a/analysis/webservice/algorithms_spark/TimeSeriesSpark.py
+++ b/analysis/webservice/algorithms_spark/TimeSeriesSpark.py
@@ -213,6 +213,8 @@ class TimeSeriesSparkHandlerImpl(NexusCalcSparkHandler):
                                                                                
    0,
                                                                                
    31535999,
                                                                                
    metrics_callback=metrics_record.record_metrics)
+                if len(daysinrange_clim) == 0:
+                    raise NexusProcessingException(reason="There is no 
climatology data present for dataset " + shortName + ".") 
                 results_clim, _ = spark_driver(daysinrange_clim,
                                                bounding_polygon,
                                                shortName_clim,

Reply via email to