Revision 126

View differences:

org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/library/LibraryException.java
26 26
 */
27 27
package org.gvsig.tools.library;
28 28

  
29
import java.util.List;
30

  
29 31
import org.gvsig.tools.exception.BaseRuntimeException;
32
import org.gvsig.tools.exception.ListBaseException;
30 33

  
31 34
/**
32 35
 * Exception for errors in the initialization of a Library.
......
41 44

  
42 45
	private static final String MESSAGE = "Error in the initialization of the Library: %(library)";
43 46

  
47
	private static class ListExceptions extends ListBaseException {
48

  
49
		/**
50
		 * 
51
		 */
52
		private static final long serialVersionUID = -1621810010494819633L;
53
		
54
		public ListExceptions(List causes) {
55
			super(MESSAGE, KEY, serialVersionUID);
56
			this.addAll(causes);
57
		}
58

  
59
	}
60
	
44 61
	/**
45 62
	 * Creates a new exception from a cause exception.
46 63
	 * 
......
61 78
	public LibraryException(Class libraryClass, Throwable cause) {
62 79
		this(libraryClass.getName(), cause);
63 80
	}
81

  
82
	public LibraryException(Class libraryClass, ListBaseException causes) {
83
		this(libraryClass.getName(), causes);
84
	}
85

  
86
	public LibraryException(Class libraryClass, List causes) {
87
		this(libraryClass.getName(), new ListExceptions(causes));
88
	}
64 89
}

Also available in: Unified diff