Constructors Summary |
---|
public SQLException(String reason, String SQLState, int vendorCode)Constructs a fully-specified SQLException object.
super(reason);
this.SQLState = SQLState;
this.vendorCode = vendorCode;
if (!(this instanceof SQLWarning)) {
if (DriverManager.getLogWriter() != null) {
DriverManager.println("SQLException: SQLState(" + SQLState +
") vendor code(" + vendorCode + ")");
printStackTrace(DriverManager.getLogWriter());
}
}
|
public SQLException(String reason, String SQLState)Constructs an SQLException object with the given reason and
SQLState; the vendorCode field defaults to 0.
super(reason);
this.SQLState = SQLState;
this.vendorCode = 0;
if (!(this instanceof SQLWarning)) {
if (DriverManager.getLogWriter() != null) {
printStackTrace(DriverManager.getLogWriter());
DriverManager.println("SQLException: SQLState(" + SQLState + ")");
}
}
|
public SQLException(String reason)Constructs an SQLException object with a reason;
the SQLState field defaults to null , and
the vendorCode field defaults to 0.
super(reason);
this.SQLState = null;
this.vendorCode = 0;
if (!(this instanceof SQLWarning)) {
if (DriverManager.getLogWriter() != null) {
printStackTrace(DriverManager.getLogWriter());
}
}
|
public SQLException()Constructs an SQLException object;
the reason field defaults to null,
the SQLState field defaults to null , and
the vendorCode field defaults to 0.
super();
this.SQLState = null;
this.vendorCode = 0;
if (!(this instanceof SQLWarning)) {
if (DriverManager.getLogWriter() != null) {
printStackTrace(DriverManager.getLogWriter());
}
}
|