Commit 440a8a0c authored by Michael Ritter's avatar Michael Ritter
Browse files

Use java.mail MessageException

parent 1f86af51
......@@ -31,15 +31,9 @@
package edu.umiacs.ace.monitor.reporting;
import com.sun.jersey.api.MessageException;
import edu.umiacs.ace.monitor.log.LogEnum;
import edu.umiacs.ace.monitor.log.LogEventManager;
import edu.umiacs.ace.util.PersistUtil;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import javax.persistence.EntityManager;
import org.apache.log4j.Logger;
import org.apache.log4j.NDC;
import org.quartz.CronExpression;
......@@ -48,6 +42,13 @@ import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import javax.mail.MessagingException;
import javax.persistence.EntityManager;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
/**
* Report Generation job for quartz
* @author toaster
......@@ -90,9 +91,9 @@ public class ReportJob implements Job {
} catch ( ParseException ex ) {
LOG.error("Unknown parse exception", ex);
throw new JobExecutionException(ex);
} catch ( MessageException ex) {
} catch (MessagingException ex) {
EntityManager em = PersistUtil.getEntityManager();
logManager.persistCollectionEvent(LogEnum.SMTP_ERROR,
logManager.persistCollectionEvent(LogEnum.SMTP_ERROR,
ex.getMessage(), em);
em.close();
LOG.error("Could not send report summary", ex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment