7
7
* Copyright (c) 2003, PostgreSQL Global Development Group
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PSQLException.java,v 1.10 2003/03/08 06:06:55 barry Exp $
10
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/util/Attic/PSQLException.java,v 1.11 2003/03/14 01:21:47 barry Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
16
16
import java .io .ByteArrayOutputStream ;
17
17
import java .io .PrintWriter ;
18
18
import java .sql .SQLException ;
19
+ import org .postgresql .Driver ;
19
20
20
21
public class PSQLException extends SQLException
21
22
{
@@ -29,6 +30,8 @@ public PSQLException(String error)
29
30
{
30
31
super ();
31
32
translate (error , null );
33
+ if (Driver .logDebug )
34
+ Driver .debug ("Exception: " + this );
32
35
}
33
36
34
37
/*
@@ -40,6 +43,8 @@ public PSQLException(String error, Object[] args)
40
43
{
41
44
super ();
42
45
translate (error , args );
46
+ if (Driver .logDebug )
47
+ Driver .debug ("Exception: " + this );
43
48
}
44
49
45
50
/*
@@ -51,6 +56,8 @@ public PSQLException(String error, Object arg)
51
56
Object [] argv = new Object [1 ];
52
57
argv [0 ] = arg ;
53
58
translate (error , argv );
59
+ if (Driver .logDebug )
60
+ Driver .debug ("Exception: " + this );
54
61
}
55
62
56
63
/*
@@ -82,6 +89,8 @@ public PSQLException(String error, Exception ex)
82
89
}
83
90
84
91
translate (error , argv );
92
+ if (Driver .logDebug )
93
+ Driver .debug ("Exception: " + this );
85
94
}
86
95
87
96
/*
@@ -94,6 +103,8 @@ public PSQLException(String error, Object arg1, Object arg2)
94
103
argv [0 ] = arg1 ;
95
104
argv [1 ] = arg2 ;
96
105
translate (error , argv );
106
+ if (Driver .logDebug )
107
+ Driver .debug ("Exception: " + this );
97
108
}
98
109
99
110
private void translate (String error , Object [] args )
0 commit comments