Commits

Anonymous committed 876d2de

trap notificationType not being defined

  • Participants
  • Parent commits d3adbff

Comments (0)

Files changed (2)

File ingest-src/src/main/java/org/cdlib/mrt/ingest/handlers/HandlerNotification.java

 	FormatType formatType = null;
 
 	try {
-            if (profileState.getNotificationType().equalsIgnoreCase("verbose")) {
-                if (DEBUG) System.out.println("[info] " + MESSAGE + "Detected 'verbose' format type.");
-                verbose = true;
-            }
+	    try {
+                if (profileState.getNotificationType().equalsIgnoreCase("verbose")) {
+                    if (DEBUG) System.out.println("[info] " + MESSAGE + "Detected 'verbose' format type.");
+                    verbose = true;
+                }
+	    } catch (Exception e) {}
 
 	    // Is this a batch submission?
 	    if (jobState.grabBatchID().getValue().equalsIgnoreCase(ProfileUtil.DEFAULT_BATCH_ID)) {

File ingest-src/src/main/java/org/cdlib/mrt/ingest/handlers/queue/HandlerNotification.java

         String batchID = batchState.getBatchID().getValue();
 
 	try {
-	    if (profileState.getNotificationType().equalsIgnoreCase("verbose")) {
-                if (DEBUG) System.out.println("[info] " + MESSAGE + "Detected 'verbose' format type.  Skipping notification.");
-                return new HandlerResult(true, "SUCCESS: " + NAME + " no notification required", 0);
-	    }
+	    try {
+	        if (profileState.getNotificationType().equalsIgnoreCase("verbose")) {
+                    if (DEBUG) System.out.println("[info] " + MESSAGE + "Detected 'verbose' format type.  Skipping notification.");
+                    return new HandlerResult(true, "SUCCESS: " + NAME + " no notification required", 0);
+	        }
+	    } catch (Exception e) {}
 
   	    email.setHostName("localhost");	// production machines are SMTP enabled
 	    for (Notification recipient : profileState.getContactsEmail()) {