View Javadoc

1   /*
2    * Copyright 2005 Jukka Zitting <jz@yukatan.fi>
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.exorcist.api;
17  
18  /***
19   * Exception for reporting problems within Exorcist plugins.
20   * A ContentException is thrown by an Exorcist plugin when some external
21   * reason prevents the plugin from performing its task. Examples of such
22   * reasons are:
23   * <ul>
24   *   <li>Missing or incorrect configuration information</li>
25   *   <li>Problems in finding or contacting an external content repository</li>
26   *   <li>Unexpected content structure or formatting</li>
27   * </ul>
28   * <p>
29   * Runtime problems such as missing dependencies, out of memory errors, and
30   * internal logic problems (null pointers, etc.) should be reported using
31   * standard {@link RuntimeException RuntimeExceptions} and {@link Error Errors}.
32   */
33  public class ContentException extends Exception {
34  
35      /***
36       * Creates a ContentException with the given error message.
37       *
38       * @param message error message
39       */
40      public ContentException(String message) {
41          super(message);
42      }
43  
44      /***
45       * Creates a ContentException with the given root cause.
46       *
47       * @param cause root cause of this exception
48       */
49      public ContentException(Throwable cause) {
50          super(cause);
51      }
52  
53      /***
54       * Creates a ContentException with the given error message and root cause.
55       *
56       * @param message error message
57       * @param cause root cause of this exception
58       */
59      public ContentException(String message, Throwable cause) {
60          super(message, cause);
61      }
62  
63  }