01: /*
02: * Copyright 2004 Clinton Begin
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: * You may obtain a copy of the License at
07: *
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 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: /**
19: * Thrown to indicate a problem with SQL Map configuration or state. Generally
20: * if an SqlMapException is thrown, something is critically wronge and cannot
21: * be corrected until a change to the configuration or the environment is made.
22: * <p/>
23: * Note: Generally this wouldn't be used to indicate that an SQL execution error
24: * occurred (that's what SQLException is for).
25: */
26: public class SqlMapException extends RuntimeException {
27:
28: /**
29: * Simple constructor
30: */
31: public SqlMapException() {
32: }
33:
34: /**
35: * Constructor to create exception with a message
36: *
37: * @param msg A message to associate with the exception
38: */
39: public SqlMapException(String msg) {
40: super (msg);
41: }
42:
43: /**
44: * Constructor to create exception to wrap another exception
45: *
46: * @param cause The real cause of the exception
47: */
48: public SqlMapException(Throwable cause) {
49: super (cause);
50: }
51:
52: /**
53: * Constructor to create exception to wrap another exception and pass a message
54: *
55: * @param msg The message
56: * @param cause The real cause of the exception
57: */
58: public SqlMapException(String msg, Throwable cause) {
59: super(msg, cause);
60: }
61:
62: }
|