From b6685d6dcb8569df108a41c939ff5b670983e66c Mon Sep 17 00:00:00 2001 From: Slav Korolev Date: Thu, 17 Apr 2014 09:10:13 -0400 Subject: [PATCH] Issue #2942 - Updated throw exception. Former-commit-id: ae2275a0ee26a70a25542130eb88cea0c23fc2ea [formerly 1457190469ec62f7a7aa2fa8e62ee2012dd57c10] Former-commit-id: 881adcb78f5dc360fb0bc3990b2714975ba805c1 --- .../uf/edex/plugin/manualIngest/MessageGenerator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/src/com/raytheon/uf/edex/plugin/manualIngest/MessageGenerator.java b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/src/com/raytheon/uf/edex/plugin/manualIngest/MessageGenerator.java index 3d4f4e3353..fd3dd91937 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/src/com/raytheon/uf/edex/plugin/manualIngest/MessageGenerator.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.manualIngest/src/com/raytheon/uf/edex/plugin/manualIngest/MessageGenerator.java @@ -56,6 +56,8 @@ import com.raytheon.uf.edex.distribution.DistributionPatterns; * ------------ ---------- ----------- -------------------------- * Oct 28, 2009 brockwoo Initial creation * Sep 03, 2013 2327 rjpeter Added directory routing by plugin and date of product. + * Apr 17, 2014 2942 skorolev Updated throw exception in sendFileToIngest. + * * * * @author brockwoo @@ -285,6 +287,10 @@ public class MessageGenerator implements Processor { try { File archiveFile = copyFileToArchive(new File(inFile)); + if (archiveFile == null) { + throw new Exception("File " + inFile + + " has not been copied into archive."); + } EDEXUtil.getMessageProducer().sendAsync(route, archiveFile.getAbsolutePath()); } catch (Exception e) {