1 package org.apache.maven;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 /**
22 * The base class for all exceptions thrown by MavenSession.
23 *
24 * @version $Id: MavenException.java 517014 2007-03-11 21:15:50Z ltheussl $
25 */
26 public class MavenException
27 extends Exception
28 {
29
30 /**
31 * Generated serial version ID
32 */
33 private static final long serialVersionUID = 5162719944310719528L;
34
35 /**
36 * Creates a new instance of <code>MavenException</code> without detail
37 * message.
38 */
39 public MavenException()
40 {
41 super();
42 }
43
44 /**
45 * Constructs an instance of <code>MavenException</code> with the specified
46 * detail message.
47 *
48 * @param msg the detail message.
49 */
50 public MavenException( String msg )
51 {
52 super( msg );
53 }
54
55 /**
56 * Constructs an exception with the given message and exception as
57 * a root cause.
58 *
59 * @param message A description of or information about the exception.
60 * Should not be <code>null</code> unless a cause is specified.
61 * @param cause The exception that might have caused this one.
62 * May be <code>null</code>.
63 */
64 public MavenException( String message, Throwable cause )
65 {
66 super( message, cause );
67 }
68
69 /**
70 * Constructs an exception with the given exception as a root cause.
71 *
72 * @param cause The exception that might have caused this one.
73 * Should not be <code>null</code>.
74 */
75 public MavenException( Throwable cause )
76 {
77 super( cause );
78 }
79
80 /**
81 * Returns the nested exception, if any.
82 *
83 * @return the nested exception, or <code>null</code> if no
84 * exception is associated with this one
85 */
86 public Throwable getException()
87 {
88 return getCause();
89 }
90 }