View Javadoc

1   /*
2    CommandLineException.java
3    Creation date : 27/04/2010
4    Copyright © Benjamin Croizet (graffity2199@yahoo.fr)
5   
6    This program is free software; you can redistribute it and/or
7    modify it under the terms of the GNU General Public License
8    or GNU Lesser General Public License as published by the
9    Free Software Foundation; either version 3 of the License,
10   or (at your option) any later version.
11  
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16  
17   You should have received copies of the GNU General Public License
18   and GNU Lesser General Public License along with this program;
19   if not, write to the Free Software Foundation, Inc.,
20   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21   http://www.fsf.org/licensing/licenses/gpl.html
22   http://www.gnu.org/licenses/lgpl.html
23   */
24  
25  package net.sourceforge.plantumldependency.commoncli.exception;
26  
27  /**
28   * The exception which is thrown when an error occurs while reading / executing a command line.
29   *
30   * @author Benjamin Croizet (<a href="mailto:graffity2199@yahoo.fr>graffity2199@yahoo.fr</a>)
31   * @since 1.3.0
32   * @version 1.3.0
33   */
34  public class CommandLineException extends Exception {
35  
36      /** Serial version UID. */
37      private static final long serialVersionUID = 4349247857238395018L;
38  
39      /**
40       * Constructs a new exception with the specified detail message. The cause is not initialized,
41       * and may subsequently be initialized by a call to {@link #initCause}.
42       *
43       * @param messageKey
44       *            the detail message key, ready to be translated. The detail message key is saved
45       *            for later retrieval by the {@link #getMessage()} method.
46       * @since 1.3.0
47       */
48      public CommandLineException(final String messageKey) {
49          super(messageKey);
50      }
51  
52      /**
53       * Constructs a new exception with the specified detail message and cause.
54       * <p>
55       * Note that the detail message associated with <code>cause</code> is <i>not</i> automatically
56       * incorporated in this exception's detail message.
57       *
58       * @param messageKey
59       *            the detail message key, ready to be translated. The detail message key is saved
60       *            for later retrieval by the {@link #getMessage()} method.
61       * @param cause
62       *            the cause (which is saved for later retrieval by the {@link #getCause()} method).
63       *            (A <tt>null</tt> value is permitted, and indicates that the cause is nonexistent
64       *            or unknown.)
65       * @since 1.3.0
66       */
67      public CommandLineException(final String messageKey, final Throwable cause) {
68          super(messageKey, cause);
69      }
70  }