View Javadoc

1   /* This file is part of COPAL (COntext Provisioning for All).
2    *
3    * COPAL is a part of SM4All (Smart hoMes for All) project.
4    *
5    * COPAL is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU Lesser General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    *
10   * COPAL is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU Lesser General Public License for more details.
14   *
15   * You should have received a copy of the GNU Lesser General Public License
16   * along with COPAL. If not, see <http://www.gnu.org/licenses/>.
17   */
18  package at.ac.tuwien.infosys.sm4all.copal.api;
19  
20  /**
21   * Base exception which all exceptions thrown by COPAL extend.
22   * 
23   * @author sanjin
24   */
25  public class ContextException extends Exception {
26  
27      private static final long serialVersionUID = -4567662716935332927L;
28  
29      /**
30       * Create instance of context exception with the specified detail message.
31       * The cause is not initialized, and may subsequently be initialized by a
32       * call to {@link #initCause(Throwable)}.
33       * 
34       * @param message the detail message (which is saved for later retrieval by
35       *        the {@link #getMessage()} method).
36       */
37      public ContextException(final String message) {
38          super(message);
39      }
40  
41      /**
42       * Create instance of context exception with the specified detail message
43       * and cause. Note that the detail message associated with cause is not
44       * automatically incorporated in this exception's detail message.
45       * 
46       * @param message the detail message (which is saved for later retrieval by
47       *        the {@link #getMessage()} method).
48       * @param cause the cause (which is saved for later retrieval by the
49       *        {@link #getCause()} method). A <code>null</code> value is
50       *        permitted, and indicates that the cause is nonexistent or unknown.
51       */
52      public ContextException(final String message, final Throwable cause) {
53          super(message, cause);
54      }
55  }