KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > config > ConfigurationException


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.config;
8
9 import org.jboss.cache.CacheException;
10
11 import java.util.ArrayList JavaDoc;
12 import java.util.List JavaDoc;
13
14 /**
15  * An exception that represents an error in the configuration
16  *
17  * @author <a HREF="mailto:manik@jboss.org">Manik Surtani (manik@jboss.org)</a>
18  */

19 public class ConfigurationException extends CacheException
20 {
21
22    private static final long serialVersionUID = -5576382839360927955L;
23
24    private List JavaDoc<String JavaDoc> erroneousAttributes = new ArrayList JavaDoc<String JavaDoc>();
25
26    public ConfigurationException(Exception JavaDoc e)
27    {
28       super(e);
29    }
30
31    public ConfigurationException(String JavaDoc string)
32    {
33       super(string);
34    }
35
36    public ConfigurationException(String JavaDoc string, String JavaDoc erroneousAttribute)
37    {
38       super(string);
39       erroneousAttributes.add(erroneousAttribute);
40    }
41
42    public ConfigurationException(String JavaDoc string, Throwable JavaDoc throwable)
43    {
44       super(string, throwable);
45    }
46
47    public List JavaDoc<String JavaDoc> getErroneousAttributes()
48    {
49       return erroneousAttributes;
50    }
51
52    public void addErroneousAttribute(String JavaDoc s)
53    {
54       erroneousAttributes.add(s);
55    }
56 }
57
Popular Tags