From 8b5ce7c07fc033092464b7d1fdcd25491f8b4717 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Fri, 10 Jan 2014 08:57:18 -0600 Subject: [PATCH] Issue #2359 log exceptions in FFTI processing Change-Id: Iec1c743352187de071f4b9840f1672bff531ba94 Former-commit-id: 1d9229a4a6b26f934557b7805c5456dec5c984be [formerly d289eb1b55a562d4c1426d7ffd99a4ecd79619b0] [formerly 43b75928e4aedb5413284177be9ec8360c85494c [formerly 2abd0cc65b6fe98dc95e11b5b8d53a325c0f2074]] Former-commit-id: 43b75928e4aedb5413284177be9ec8360c85494c Former-commit-id: daba59930ddc2b074eefff72896b0242de99b59b --- .../uf/edex/plugin/ffmp/common/FFTI.java | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java index e1e2d24d97..04fb10c755 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java @@ -53,8 +53,9 @@ import com.raytheon.uf.edex.plugin.ffmp.FFMPGenerator; * ------------ ---------- ----------- -------------------------- * Apr 01, 2011 dhladky Initial creation * July 13, 2012 dhladky Revamped to help memory - * 02/01/13 1569 D. Hladky Added constants + * 02/01/13 1569 D. Hladky Added constants * 02/25/13 1660 D. Hladky Moved FFTI processing to help with mosaic memory usage + * 01/10/14 2359 njensen Fix exception logging * * * @@ -235,8 +236,8 @@ public class FFTI implements Runnable { for (int j = 0; j < sites.size(); j++) { - FFTIAccum faccum = ffmpgen.getAccumulationForSite(displayName, - sites.get(j), dataKey, duration, + FFTIAccum faccum = ffmpgen.getAccumulationForSite( + displayName, sites.get(j), dataKey, duration, source.getUnit()); if (faccum != null) { @@ -278,8 +279,8 @@ public class FFTI implements Runnable { source = ffmpgen.getSourceConfig().getSourceByDisplayName( fftiSourceKey); - accum = ffmpgen.getAccumulationForSite(fftiSourceKey, fftiSiteKey, - fftiSiteKey, duration, source.getUnit()); + accum = ffmpgen.getAccumulationForSite(fftiSourceKey, + fftiSiteKey, fftiSiteKey, duration, source.getUnit()); if (accum != null) { accum.setUnit(source.getUnit()); @@ -430,11 +431,11 @@ public class FFTI implements Runnable { } } } catch (Exception e) { - statusHandler.handle( - Priority.ERROR, - "Failed to evaluate Ratio/Diff. " - + attribute.getAttributeName() + ": " + displayName - + "\n" + e); + statusHandler + .handle(Priority.ERROR, + "Failed to evaluate Ratio/Diff. " + + attribute.getAttributeName() + ": " + + displayName, e); } } @@ -521,8 +522,10 @@ public class FFTI implements Runnable { } } catch (Exception e) { statusHandler - .handle(Priority.ERROR, "failed to transmit FFTI alert. " - + attribute.getAttributeName() + " Value: " + value); + .handle(Priority.ERROR, + "failed to transmit FFTI alert. " + + attribute.getAttributeName() + " Value: " + + value, e); } } @@ -576,8 +579,10 @@ public class FFTI implements Runnable { } } catch (Exception e) { statusHandler - .handle(Priority.ERROR, "failed to transmit FFTI alert. " - + attribute.getAttributeName() + " Value: " + value); + .handle(Priority.ERROR, + "failed to transmit FFTI alert. " + + attribute.getAttributeName() + " Value: " + + value, e); } } @@ -649,8 +654,8 @@ public class FFTI implements Runnable { ffmpgen.logger.debug("FFTI: finsihed evaluating sources"); } } catch (Exception e) { - statusHandler.handle(Priority.ERROR, "failed to evaluate FFTI. " - + e); + statusHandler + .handle(Priority.ERROR, "failed to evaluate FFTI. ", e); } finally { ffmpgen.fftiSources.clear(); ffmpgen.fftiDone = true; @@ -787,7 +792,8 @@ public class FFTI implements Runnable { * @return */ public static Double getGap(FFMPDataContainer qpeContainer, - SourceXML ffmpQSource, Date curdate, double duration, String qSiteKey) { + SourceXML ffmpQSource, Date curdate, double duration, + String qSiteKey) { long timeBack = (long) (duration * TimeUtil.MILLIS_PER_HOUR); Date backDate = new Date(curdate.getTime() - timeBack); @@ -841,4 +847,4 @@ public class FFTI implements Runnable { return sourceLengths; } -} \ No newline at end of file +}