OSDN Git Service

273790d77cf5446bd9f43745ee6096fc90edfd4b
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / BirthmarkExtractionFailedException.java
1 package jp.sourceforge.stigmata;
2
3 /*
4  * $Id$
5  */
6
7 import java.util.ArrayList;
8 import java.util.List;
9
10 /**
11  * 
12  * @author Haruaki TAMADA
13  * @version $Revision$ 
14  */
15 public class BirthmarkExtractionFailedException extends BirthmarkException {
16        private static final long serialVersionUID = 21932436457235L;
17
18        private List<Throwable> causes = new ArrayList<Throwable>();
19
20        public BirthmarkExtractionFailedException() {
21                super();
22        }
23
24        public BirthmarkExtractionFailedException(String arg0, Throwable cause) {
25                super(arg0, cause);
26        }
27
28        public BirthmarkExtractionFailedException(String arg0) {
29                super(arg0);
30        }
31
32        public BirthmarkExtractionFailedException(Throwable cause) {
33                super(cause);
34        }
35
36        public boolean isFailed(){
37                return causes.size() != 0;
38        }
39
40        public void addCause(Throwable cause){
41                causes.add(cause);
42        }
43
44        public void addCauses(Throwable[] causeList){
45                for(Throwable throwable: causeList){
46                        causes.add(throwable);
47                }
48        }
49
50        public Throwable[] getCauses(){
51                return causes.toArray(new Throwable[causes.size()]);
52        }
53 }