1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package jdbcadmin.core.exceptions;
21
22 import org.apache.commons.lang.exception.NestableException;
23
24 /***
25 * Exception thrown for convertion errors
26 * @author Thomas Recloux (trecloux@norsys.fr)
27 */
28 public class ConvertionException extends NestableException {
29
30
31 /***
32 // * Constructor which set up the message, the name of the concerned property
33 // * and a sample value.
34 // * @param aMessage The exception message
35 // * @param aSampleValue The sample value
36 // * @param aPropertyName The name of the property
37 // */
38
39
40
41
42
43
44 /***
45 * Constructor which set up the message, the name of the concerned property
46 * , a sample value and the source exception.
47 * @param aMessage The exception message
48 * @param aSampleValue The sample value
49 * @param aPropertyName The name of the property
50 * @param aSource source exception
51 */
52 public ConvertionException(String aMessage, String aPropertyName, String aSampleValue, Throwable aSource) {
53 super(aMessage, aSource);
54 this.propertyName = aPropertyName;
55 this.sampleValue = aSampleValue;
56 }
57
58
59 /*** Name of the property concerned by the convertion error. */
60 private String propertyName;
61
62 /*** sample value. */
63 private String sampleValue;
64
65
66
67 /***
68 * @return Returns the propertyName.
69 */
70 public String getPropertyName() {
71 return propertyName;
72 }
73
74 /***
75 * @return Returns the sampleValue.
76 */
77 public String getSampleValue() {
78 return sampleValue;
79 }
80
81 }