Project

General

Profile

1
package eu.dnetlib.validator.commons.email;
2

    
3
import java.util.ArrayList;
4
import java.util.List;
5

    
6
import org.apache.log4j.Logger;
7

    
8

    
9
public class BugReporter {
10

    
11
	private transient Logger logger = Logger.getLogger(BugReporter.class);
12
	
13
	private String ex = null;
14

    
15
	public void report() {
16
		List<String> recipients = new ArrayList<String>();
17
		try {
18
			recipients.add("antleb@di.uoa.gr");
19
			String message = "An exception has occurred:\n"+ex;
20
			String subject = "Automatic Bug Report";
21
//			this.getEmailer().sendMail(recipients, subject, message, false, null);
22
		} catch (Exception e) {
23
			logger.error("error sending error report", e);
24
		}
25
	}
26

    
27
	public void setEx(String ex) {
28
		this.ex = ex;
29
	}
30

    
31
	public String getEx() {
32
		return ex;
33
	}
34
	
35
	
36

    
37
}
(1-1/2)