-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDatabaseNotCompatibleException.java
More file actions
53 lines (41 loc) · 1.52 KB
/
DatabaseNotCompatibleException.java
File metadata and controls
53 lines (41 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package org.utplsql.api.exception;
import org.utplsql.api.DBHelper;
import java.sql.SQLException;
/** Custom exception to indicate API is not compatible with database framework
*
* @author pesse
*
*/
public class DatabaseNotCompatibleException extends SQLException {
private String clientVersion;
private String databaseVersion;
public DatabaseNotCompatibleException( String message, String clientVersion, String databaseVersion, Throwable cause )
{
super(message, cause);
this.clientVersion = clientVersion;
this.databaseVersion = databaseVersion;
}
public DatabaseNotCompatibleException( String clientVersion, String databaseVersion, Throwable cause )
{
this("utPLSQL API (" + String.valueOf(clientVersion) + ") not compatible with database (" + String.valueOf(databaseVersion) + ")", clientVersion, databaseVersion, cause);
}
public DatabaseNotCompatibleException( String clientVersion, String databaseVersion )
{
this(clientVersion, databaseVersion, null);
}
public DatabaseNotCompatibleException( String databaseVersion, Throwable cause )
{
this(DBHelper.UTPLSQL_COMPATIBILITY_VERSION, databaseVersion, cause );
}
public DatabaseNotCompatibleException( String databaseVersion )
{
this(DBHelper.UTPLSQL_COMPATIBILITY_VERSION, databaseVersion, null );
}
public String getClientVersion() {
return clientVersion;
}
public String getDatabaseVersion()
{
return databaseVersion;
}
}