1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.beanutils;
19
20
21 /**
22 * <p>A <strong>ConversionException</strong> indicates that a call to
23 * <code>Converter.convert()</code> has failed to complete successfully.
24 *
25 * @author Craig McClanahan
26 * @author Paulo Gaspar
27 * @since 1.3
28 */
29
30 public class ConversionException extends RuntimeException {
31
32
33
34
35
36 /**
37 * Construct a new exception with the specified message.
38 *
39 * @param message The message describing this exception
40 */
41 public ConversionException(String message) {
42
43 super(message);
44
45 }
46
47
48 /**
49 * Construct a new exception with the specified message and root cause.
50 *
51 * @param message The message describing this exception
52 * @param cause The root cause of this exception
53 */
54 public ConversionException(String message, Throwable cause) {
55
56 super(message);
57 this.cause = cause;
58
59 }
60
61
62 /**
63 * Construct a new exception with the specified root cause.
64 *
65 * @param cause The root cause of this exception
66 */
67 public ConversionException(Throwable cause) {
68
69 super(cause.getMessage());
70 this.cause = cause;
71
72 }
73
74
75
76
77
78 /**
79 * The root cause of this <code>ConversionException</code>, compatible with
80 * JDK 1.4's extensions to <code>java.lang.Throwable</code>.
81 */
82 protected Throwable cause = null;
83
84 public Throwable getCause() {
85 return (this.cause);
86 }
87
88
89 }