adding better reporting to markov

This commit is contained in:
Andy Eschbacher 2016-09-02 18:02:56 -04:00
parent 6d6d7ef2ba
commit c229a85491

View File

@ -56,9 +56,9 @@ def spatial_markov_trend(subquery, time_cols, num_classes=7,
) )
if len(query_result) == 0: if len(query_result) == 0:
return zip([None], [None], [None], [None], [None]) return zip([None], [None], [None], [None], [None])
except plpy.SPIError, err: except plpy.SPIError, e:
plpy.debug('Query failed with exception %s: %s' % (err, pu.construct_neighbor_query(w_type, qvals))) plpy.debug('Query failed with exception %s: %s' % (err, pu.construct_neighbor_query(w_type, qvals)))
plpy.error('Query failed, check the input parameters') plpy.error('Analysis failed: %s' % e)
return zip([None], [None], [None], [None], [None]) return zip([None], [None], [None], [None], [None])
## build weight ## build weight