1 /***
2 * Copyright 2003-2010 Terracotta, Inc.
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
17 package net.sf.ehcache.search;
18
19 import net.sf.ehcache.CacheException;
20
21 /***
22 * A generic search exception. This exception (or a more specific subclass) will be
23 * thrown for a number of conditions including (but not limited to):
24 * <ul>
25 * <li>Type conflict for search attribute. For example a search attribute is of type "int" but the query criteria is for
26 * equals("some string")
27 * <li>IOException or timeout communicating with a remote server or performing disk I/O
28 * <li>Attempting to read from a discard()'d {@link Results} instance
29 * </ul>
30 *
31 * @author teck
32 */
33 public class SearchException extends CacheException {
34
35 private static final long serialVersionUID = 6942653724476318512L;
36
37 /***
38 * Construct a search exception
39 *
40 * @param message
41 */
42 public SearchException(String message) {
43 super(message);
44 }
45
46 /***
47 * Construct a search exception with an underlying cause and message
48 *
49 * @param message
50 * @param cause
51 */
52 public SearchException(String message, Throwable cause) {
53 super(message, cause);
54 }
55
56 /***
57 * Construct a search exception with an underlying cause
58 *
59 * @param cause
60 */
61 public SearchException(Throwable cause) {
62 super(cause);
63 }
64
65 }