01: /**
02: * Copyright 2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: *
07: * You may obtain a copy of the License at
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 WARRANTIE
13: * 0S OR CONDITIONS OF ANY KIND, either express or implied.
14: * 0See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.cocoon.components.search;
17:
18: /**
19: * Index Exception class
20: *
21: * @author Nicolas Maisonneuve
22: */
23: public class IndexException extends Exception {
24:
25: private String message;
26:
27: public IndexException(String mes) {
28: this (mes, null);
29: }
30:
31: public IndexException(Exception ex) {
32: this ("", ex);
33: }
34:
35: /**
36: * Constructor
37: *
38: * @param mes
39: * message
40: * @param ex
41: * initial exception
42: */
43: public IndexException(String mes, Exception ex) {
44:
45: message = mes;
46: if (ex != null) {
47: initCause(ex);
48: }
49: }
50:
51: public String getMessage() {
52: return "message: " + message;
53: }
54:
55: }
|