Revision 20100 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/DriverException.java

View differences:

DriverException.java
44 44
import com.iver.utiles.IDescriptableException;
45 45

  
46 46
/**
47
 * Excepci?n que indica un problema con los drivers. El problema concreto viene
48
 * dado por la excepci?n hija
47
 * <p>A <code>DriverException</code> is thrown if a driver fails. This exception doesn't reports about
48
 *  the cause of the failure, that task is made by its inner {@link ExceptionDescription ExceptionDescription}.</p>
49 49
 */
50 50
public class DriverException extends Exception implements IDescriptableException{
51 51
	
......
62 62
	 * 
63 63
	 */
64 64
	/**
65
	 * It has information about the cause of the DriverException
66
	 * (and an error message to the user)
65
	 * <p>Detailed information about the cause of this exception. It's useful for example for {@link DriverException DriverException}.</p>
67 66
	 */
68 67
	private ExceptionDescription exceptionType;
69 68
	
70
	
71
	
72 69
	/**
73
	 * Crea un nuevo DriverException
74
	 *
75
	 * @param message
70
	 * <p>Constructs a new <code>DriverException</code> with the specified detail message. The cause is not
71
	 *  initialized, and may subsequently be initialized by a call to initCause.</p>
76 72
	 */
77 73
	public DriverException(String message) {
78 74
		super(message);
79 75
	}
80 76
	
77
	/**
78
	 * <p>Constructs a new <code>DriverException</code> with the specified detail message and the exception which
79
	 *  produced this one.</p>
80
	 * 
81
	 * @param message the detail message (which is saved for later retrieval by the getMessage() method).
82
	 * @param type the exception which caused this one and has detailed information about the causes
83
	 */
81 84
	public DriverException(String message, ExceptionDescription type){
82 85
		super(message);
83 86
		this.exceptionType = type;
84 87
	}
85 88
	
86 89
	/**
87
	 * New constructor to specify ExceptionDescription
88
	 * @param message
89
	 * @param cause
90
	 * @param exceptionType
90
	 * <p>Constructs a new <code>DriverException</code> with the specified detail message, cause and the original
91
	 *  exception that produced this one. This second exception will have the complete information about the causes.</p>
92
	 * <p>Note that the detail message associated with the cause is not automatically incorporated
93
	 *  in this exception's detail message.</p>
94
	 *
95
	 * @param message the detail message (which is saved for later retrieval calling <code>getMessage()</code>).
96
	 * @param cause the cause (which is saved for later retrieval calling <code>getCause()</code>)). (A <code>null</code>
97
	 *  value is permitted, and indicates that the cause is nonexistent or unknown.)
98
	 * @param exceptionType detailed information about the cause of this exception
91 99
	 */
92 100
	public DriverException(String message, 
93 101
							Throwable cause, 
......
97 105
	}
98 106
	
99 107
	/**
100
	 * Returns the ExceptionDescription associated to this DriverException
101
	 * @return
108
	 * <p>Gets the exception which caused this one and has detailed information about the causes.</p>
109
	 *
110
	 * @return the exception which caused this one and has detailed information about the causes
102 111
	 */
103 112
	public ExceptionDescription getExceptionType(){
104 113
		if(exceptionType != null)
......
107 116
//		else 
108 117
//			return ExceptionDescription.getType("GENERIC");
109 118
	}
110
	
111 119

  
112 120
	/**
113
	 * Crea un nuevo DriverException
114
	 *
115
	 * @param message
116
	 * @param cause
121
	 * <p>Constructs a new <code>DriverException</code> with the specified detail message and cause.</p>
122
	 * 
123
	 * @param message the detail message (which is saved for later retrieval calling <code>getMessage()</code>).
124
	 * @param cause the cause (which is saved for later retrieval calling <code>getCause()</code>). (A <code>null</code>
125
	 *  value is permitted, and indicates that the cause is nonexistent or unknown.)
117 126
	 */
118 127
	public DriverException(String message, Throwable cause) {
119 128
		super(message, cause);
120 129
	}
121 130

  
122 131
	/**
123
	 * Crea un nuevo DriverException
124
	 *
125
	 * @param cause
132
	 * @see Exception#Exception(Throwable)
126 133
	 */
127 134
	public DriverException(Throwable cause) {
128 135
		super(cause);
129 136
	}
130
	
137

  
138
	/**
139
	 * <p>Constructs a new <code>DriverException</code> with the cause and a description.</p>
140
	 * 
141
	 * @param cause the cause (which is saved for later retrieval calling <code>getCause()</code>). (A <code>null</code>
142
	 *  value is permitted, and indicates that the cause is nonexistent or unknown.)
143
	 * @param type the exception which caused this one and has detailed information about the causes
144
	 */
131 145
	public DriverException(Throwable cause, ExceptionDescription type){
132 146
		super(cause);
133 147
		this.exceptionType = type;

Also available in: Unified diff