• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / ibatis-2 / 730

28 Dec 2025 10:16PM UTC coverage: 65.615% (+0.5%) from 65.146%
730

push

github

web-flow
Update README.md

1602 of 2802 branches covered (57.17%)

5053 of 7701 relevant lines covered (65.61%)

0.66 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/src/main/java/com/ibatis/common/jdbc/exception/NestedSQLException.java
1
/*
2
 * Copyright 2004-2025 the original author or authors.
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
 *    https://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.common.jdbc.exception;
17

18
import java.sql.SQLException;
19

20
/**
21
 * Class to allow passing an Exception with the original SQLException.
22
 */
23
public class NestedSQLException extends SQLException {
24

25
  /** The Constant serialVersionUID. */
26
  private static final long serialVersionUID = 1L;
27

28
  /**
29
   * Constructor from java.sql.SQLException
30
   *
31
   * @param msg
32
   *          - the message for the exception
33
   *
34
   * @see java.sql.SQLException
35
   */
36
  public NestedSQLException(String msg) {
37
    super(msg);
×
38
  }
×
39

40
  /**
41
   * Constructor from java.sql.SQLException
42
   *
43
   * @param reason
44
   *          - the reason for the exception
45
   * @param SQLState
46
   *          - the SQLState
47
   *
48
   * @see java.sql.SQLException
49
   */
50
  public NestedSQLException(String reason, String SQLState) {
51
    super(reason, SQLState);
×
52
  }
×
53

54
  /**
55
   * Constructor from java.sql.SQLException
56
   *
57
   * @param reason
58
   *          - the reason for the exception
59
   * @param SQLState
60
   *          - the SQLState
61
   * @param vendorCode
62
   *          - a vendor supplied code to go w/ the message
63
   *
64
   * @see java.sql.SQLException
65
   */
66
  public NestedSQLException(String reason, String SQLState, int vendorCode) {
67
    super(reason, SQLState, vendorCode);
×
68
  }
×
69

70
  /**
71
   * Constructor from java.sql.SQLException with added nested exception
72
   *
73
   * @param msg
74
   *          - the message for the exception
75
   * @param cause
76
   *          - the cause of the exception
77
   */
78
  public NestedSQLException(String msg, Throwable cause) {
79
    super(msg);
1✔
80
    initCause(cause);
1✔
81
  }
1✔
82

83
  /**
84
   * Constructor from java.sql.SQLException with added nested exception
85
   *
86
   * @param reason
87
   *          - the reason for the exception
88
   * @param SQLState
89
   *          - the SQLState
90
   * @param cause
91
   *          - the cause of the exception
92
   *
93
   * @see java.sql.SQLException
94
   */
95
  public NestedSQLException(String reason, String SQLState, Throwable cause) {
96
    super(reason, SQLState);
×
97
    initCause(cause);
×
98
  }
×
99

100
  /**
101
   * Constructor from java.sql.SQLException with added nested exception
102
   *
103
   * @param reason
104
   *          - the reason for the exception
105
   * @param SQLState
106
   *          - the SQLState
107
   * @param vendorCode
108
   *          - a vendor supplied code to go w/ the message
109
   * @param cause
110
   *          - the cause of the exception
111
   */
112
  public NestedSQLException(String reason, String SQLState, int vendorCode, Throwable cause) {
113
    super(reason, SQLState, vendorCode);
1✔
114
    initCause(cause);
1✔
115
  }
1✔
116

117
  /**
118
   * Constructor from java.sql.SQLException with added nested exception
119
   *
120
   * @param cause
121
   *          - the cause of the exception
122
   */
123
  public NestedSQLException(Throwable cause) {
124
    super();
×
125
    initCause(cause);
×
126
  }
×
127
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc