KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibatis > sqlmap > client > SqlMapException


1 /*
2  * Copyright 2004 Clinton Begin
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 com.ibatis.sqlmap.client;
17
18 import com.ibatis.common.exception.NestedRuntimeException;
19
20 /**
21  * Thrown to indicate a problem with SQL Map configuration or state. Generally
22  * if an SqlMapException is thrown, something is critically wronge and cannot
23  * be corrected until a change to the configuration or the environment is made.
24  * <p/>
25  * Note: Generally this wouldn't be used to indicate that an SQL execution error
26  * occurred (that's what SQLException is for).
27  */

28 public class SqlMapException extends NestedRuntimeException {
29
30   /**
31    * Simple constructor
32    */

33   public SqlMapException() {
34   }
35
36   /**
37    * Constructor to create exception with a message
38    *
39    * @param msg A message to associate with the exception
40    */

41   public SqlMapException(String JavaDoc msg) {
42     super(msg);
43   }
44
45   /**
46    * Constructor to create exception to wrap another exception
47    *
48    * @param cause The real cause of the exception
49    */

50   public SqlMapException(Throwable JavaDoc cause) {
51     super(cause);
52   }
53
54   /**
55    * Constructor to create exception to wrap another exception and pass a message
56    *
57    * @param msg The message
58    * @param cause The real cause of the exception
59    */

60   public SqlMapException(String JavaDoc msg, Throwable JavaDoc cause) {
61     super(msg, cause);
62   }
63
64 }
65
Popular Tags