提交 3ac7cad3 authored 作者: Thomas Mueller's avatar Thomas Mueller

catch Exception instead of Throwable

上级 f031fa50
...@@ -55,7 +55,7 @@ public class Driver implements java.sql.Driver { ...@@ -55,7 +55,7 @@ public class Driver implements java.sql.Driver {
return null; return null;
} }
return new JdbcConnection(url, info); return new JdbcConnection(url, info);
} catch (Throwable e) { } catch (Exception e) {
throw Message.convert(e); throw Message.convert(e);
} }
} }
......
...@@ -42,13 +42,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -42,13 +42,14 @@ public class JdbcArray extends TraceObject implements Array {
* This method always returns an Object[]. * This method always returns an Object[].
* *
* @return the Object array * @return the Object array
* @throws SQLException
*/ */
public Object getArray() throws SQLException { public Object getArray() throws SQLException {
try { try {
debugCodeCall("getArray"); debugCodeCall("getArray");
checkClosed(); checkClosed();
return get(); return get();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -59,6 +60,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -59,6 +60,7 @@ public class JdbcArray extends TraceObject implements Array {
* *
* @param map is ignored. Only empty or null maps are supported * @param map is ignored. Only empty or null maps are supported
* @return the Object array * @return the Object array
* @throws SQLException
*/ */
public Object getArray(Map map) throws SQLException { public Object getArray(Map map) throws SQLException {
try { try {
...@@ -66,7 +68,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -66,7 +68,7 @@ public class JdbcArray extends TraceObject implements Array {
checkMap(map); checkMap(map);
checkClosed(); checkClosed();
return get(); return get();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -79,13 +81,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -79,13 +81,14 @@ public class JdbcArray extends TraceObject implements Array {
* @param index the start index of the subset (starting with 1) * @param index the start index of the subset (starting with 1)
* @param count the maximum number of values * @param count the maximum number of values
* @return the Object array * @return the Object array
* @throws SQLException
*/ */
public Object getArray(long index, int count) throws SQLException { public Object getArray(long index, int count) throws SQLException {
try { try {
debugCode("getArray(" + index + ", " + count + ");"); debugCode("getArray(" + index + ", " + count + ");");
checkClosed(); checkClosed();
return get(index, count); return get(index, count);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -99,6 +102,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -99,6 +102,7 @@ public class JdbcArray extends TraceObject implements Array {
* @param count the maximum number of values * @param count the maximum number of values
* @param map is ignored. Only empty or null maps are supported * @param map is ignored. Only empty or null maps are supported
* @return the Object array * @return the Object array
* @throws SQLException
*/ */
public Object getArray(long index, int count, Map map) throws SQLException { public Object getArray(long index, int count, Map map) throws SQLException {
try { try {
...@@ -106,7 +110,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -106,7 +110,7 @@ public class JdbcArray extends TraceObject implements Array {
checkClosed(); checkClosed();
checkMap(map); checkMap(map);
return get(index, count); return get(index, count);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -116,13 +120,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -116,13 +120,14 @@ public class JdbcArray extends TraceObject implements Array {
* arrays and therefore there is no base type. * arrays and therefore there is no base type.
* *
* @return Types.NULL * @return Types.NULL
* @throws SQLException
*/ */
public int getBaseType() throws SQLException { public int getBaseType() throws SQLException {
try { try {
debugCodeCall("getBaseType"); debugCodeCall("getBaseType");
checkClosed(); checkClosed();
return Types.NULL; return Types.NULL;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -132,13 +137,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -132,13 +137,14 @@ public class JdbcArray extends TraceObject implements Array {
* type arrays and therefore there is no base type. * type arrays and therefore there is no base type.
* *
* @return "NULL" * @return "NULL"
* @throws SQLException
*/ */
public String getBaseTypeName() throws SQLException { public String getBaseTypeName() throws SQLException {
try { try {
debugCodeCall("getBaseTypeName"); debugCodeCall("getBaseTypeName");
checkClosed(); checkClosed();
return "NULL"; return "NULL";
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -149,13 +155,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -149,13 +155,14 @@ public class JdbcArray extends TraceObject implements Array {
* (starting with 1) and the second column the value. * (starting with 1) and the second column the value.
* *
* @return the result set * @return the result set
* @throws SQLException
*/ */
public ResultSet getResultSet() throws SQLException { public ResultSet getResultSet() throws SQLException {
try { try {
debugCodeCall("getResultSet"); debugCodeCall("getResultSet");
checkClosed(); checkClosed();
return getResultSet(get(), 0); return getResultSet(get(), 0);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -166,6 +173,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -166,6 +173,7 @@ public class JdbcArray extends TraceObject implements Array {
* *
* @param map is ignored. Only empty or null maps are supported * @param map is ignored. Only empty or null maps are supported
* @return the result set * @return the result set
* @throws SQLException
*/ */
public ResultSet getResultSet(Map map) throws SQLException { public ResultSet getResultSet(Map map) throws SQLException {
try { try {
...@@ -173,7 +181,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -173,7 +181,7 @@ public class JdbcArray extends TraceObject implements Array {
checkClosed(); checkClosed();
checkMap(map); checkMap(map);
return getResultSet(get(), 0); return getResultSet(get(), 0);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -187,13 +195,14 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -187,13 +195,14 @@ public class JdbcArray extends TraceObject implements Array {
* @param index the start index of the subset (starting with 1) * @param index the start index of the subset (starting with 1)
* @param count the maximum number of values * @param count the maximum number of values
* @return the result set * @return the result set
* @throws SQLException
*/ */
public ResultSet getResultSet(long index, int count) throws SQLException { public ResultSet getResultSet(long index, int count) throws SQLException {
try { try {
debugCode("getResultSet("+index+", " + count+");"); debugCode("getResultSet("+index+", " + count+");");
checkClosed(); checkClosed();
return getResultSet(get(index, count), index); return getResultSet(get(index, count), index);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -209,6 +218,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -209,6 +218,7 @@ public class JdbcArray extends TraceObject implements Array {
* @param count the maximum number of values * @param count the maximum number of values
* @param map is ignored. Only empty or null maps are supported * @param map is ignored. Only empty or null maps are supported
* @return the result set * @return the result set
* @throws SQLException
*/ */
public ResultSet getResultSet(long index, int count, Map map) throws SQLException { public ResultSet getResultSet(long index, int count, Map map) throws SQLException {
try { try {
...@@ -216,7 +226,7 @@ public class JdbcArray extends TraceObject implements Array { ...@@ -216,7 +226,7 @@ public class JdbcArray extends TraceObject implements Array {
checkClosed(); checkClosed();
checkMap(map); checkMap(map);
return getResultSet(get(index, count), index); return getResultSet(get(index, count), index);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
package org.h2.jdbc; package org.h2.jdbc;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
...@@ -41,6 +42,7 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -41,6 +42,7 @@ public class JdbcBlob extends TraceObject implements Blob {
* Returns the length. * Returns the length.
* *
* @return the length * @return the length
* @throws SQLException
*/ */
public long length() throws SQLException { public long length() throws SQLException {
try { try {
...@@ -67,7 +69,7 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -67,7 +69,7 @@ public class JdbcBlob extends TraceObject implements Blob {
in.close(); in.close();
} }
return size; return size;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -76,6 +78,7 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -76,6 +78,7 @@ public class JdbcBlob extends TraceObject implements Blob {
* [Not supported] Truncates the object. * [Not supported] Truncates the object.
* *
* @param len the new length * @param len the new length
* @throws SQLException
*/ */
public void truncate(long len) throws SQLException { public void truncate(long len) throws SQLException {
debugCodeCall("truncate", len); debugCodeCall("truncate", len);
...@@ -88,6 +91,7 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -88,6 +91,7 @@ public class JdbcBlob extends TraceObject implements Blob {
* @param pos the index, the first byte is at position 1 * @param pos the index, the first byte is at position 1
* @param length the number of bytes * @param length the number of bytes
* @return the bytes, at most length bytes * @return the bytes, at most length bytes
* @throws SQLException
*/ */
public byte[] getBytes(long pos, int length) throws SQLException { public byte[] getBytes(long pos, int length) throws SQLException {
try { try {
...@@ -109,13 +113,18 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -109,13 +113,18 @@ public class JdbcBlob extends TraceObject implements Blob {
in.close(); in.close();
} }
return out.toByteArray(); return out.toByteArray();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
/** /**
* [Not supported] Sets some bytes of the object. * [Not supported] Sets some bytes of the object.
*
* @param pos the write position
* @param bytes the bytes to set
* @return how many bytes have been written
* @throws SQLException
*/ */
public int setBytes(long pos, byte[] bytes) throws SQLException { public int setBytes(long pos, byte[] bytes) throws SQLException {
debugCode("setBytes("+pos+", bytes);"); debugCode("setBytes("+pos+", bytes);");
...@@ -124,6 +133,13 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -124,6 +133,13 @@ public class JdbcBlob extends TraceObject implements Blob {
/** /**
* [Not supported] Sets some bytes of the object. * [Not supported] Sets some bytes of the object.
*
* @param pos the write position
* @param bytes the bytes to set
* @param offset the bytes offset
* @param len the number of bytes to write
* @return how many bytes have been written
* @throws SQLException
*/ */
public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException { public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException {
debugCode("setBytes("+pos+", bytes, "+offset+", "+len+");"); debugCode("setBytes("+pos+", bytes, "+offset+", "+len+");");
...@@ -134,19 +150,24 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -134,19 +150,24 @@ public class JdbcBlob extends TraceObject implements Blob {
* Returns the input stream. * Returns the input stream.
* *
* @return the input stream * @return the input stream
* @throws SQLException
*/ */
public InputStream getBinaryStream() throws SQLException { public InputStream getBinaryStream() throws SQLException {
try { try {
debugCodeCall("getBinaryStream"); debugCodeCall("getBinaryStream");
checkClosed(); checkClosed();
return value.getInputStream(); return value.getInputStream();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
/** /**
* [Not supported] Returns an output stream. * [Not supported] Returns an output stream.
*
* @param pos where to start writing
* @return the output stream to write into
* @throws SQLException
*/ */
public OutputStream setBinaryStream(long pos) throws SQLException { public OutputStream setBinaryStream(long pos) throws SQLException {
debugCodeCall("setBinaryStream", pos); debugCodeCall("setBinaryStream", pos);
...@@ -159,50 +180,51 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -159,50 +180,51 @@ public class JdbcBlob extends TraceObject implements Blob {
* @param pattern the pattern to search * @param pattern the pattern to search
* @param start the index, the first byte is at position 1 * @param start the index, the first byte is at position 1
* @return the position (first byte is at position 1), or -1 for not found * @return the position (first byte is at position 1), or -1 for not found
* @throws SQLException
*/ */
public long position(byte[] pattern, long start) throws SQLException { public long position(byte[] pattern, long start) throws SQLException {
debugCode("position(pattern, "+start+");"); debugCode("position(pattern, "+start+");");
if (false) {
try {
debugCode("position(pattern, " + start + ");");
if (pattern == null) {
return -1;
}
if (pattern.length == 0) {
return 1;
}
// TODO performance: blob pattern search is slow
BufferedInputStream in = new BufferedInputStream(value.getInputStream());
IOUtils.skipFully(in, start - 1);
int pos = 0;
int patternPos = 0;
while (true) {
int x = in.read();
if (x < 0) {
break;
}
if (x == (pattern[patternPos] & 0xff)) {
if (patternPos == 0) {
in.mark(pattern.length);
}
if (patternPos == pattern.length) {
return pos - patternPos;
}
patternPos++;
} else {
if (patternPos > 0) {
in.reset();
pos -= patternPos;
}
}
pos++;
}
return -1;
} catch (Exception e) {
throw logAndConvert(e);
}
}
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
// TODO test
// try {
// debugCode("position(pattern, "+start+");");
// if(pattern == null) {
// return -1;
// }
// if(pattern.length == 0) {
// return 1;
// }
// // TODO performance: blob pattern search is slow
// BufferedInputStream in =
// new BufferedInputStream(value.getInputStream());
// IOUtils.skipFully(in, start - 1);
// int pos = 0;
// int patternPos = 0;
// while(true) {
// int x = in.read();
// if(x<0) {
// break;
// }
// if(x == (pattern[patternPos] & 0xff)) {
// if(patternPos == 0) {
// in.mark(pattern.length);
// }
// if(patternPos == pattern.length) {
// return pos - patternPos;
// }
// patternPos++;
// } else {
// if(patternPos > 0) {
// in.reset();
// pos -= patternPos;
// }
// }
// pos++;
// }
// return -1;
// } catch(Throwable e) {
// throw logAndConvert(e);
// }
} }
/** /**
...@@ -211,29 +233,31 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -211,29 +233,31 @@ public class JdbcBlob extends TraceObject implements Blob {
* @param blobPattern the pattern to search * @param blobPattern the pattern to search
* @param start the index, the first byte is at position 1 * @param start the index, the first byte is at position 1
* @return the position (first byte is at position 1), or -1 for not found * @return the position (first byte is at position 1), or -1 for not found
* @throws SQLException
*/ */
public long position(Blob blobPattern, long start) throws SQLException { public long position(Blob blobPattern, long start) throws SQLException {
debugCode("position(blobPattern, "+start+");"); debugCode("position(blobPattern, "+start+");");
if (false) {
try {
debugCode("position(blobPattern, " + start + ");");
if (blobPattern == null) {
return -1;
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
InputStream in = blobPattern.getBinaryStream();
while (true) {
int x = in.read();
if (x < 0) {
break;
}
out.write(x);
}
return position(out.toByteArray(), start);
} catch (Exception e) {
throw logAndConvert(e);
}
}
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
// try {
// debugCode("position(blobPattern, "+start+");");
// if(blobPattern == null) {
// return -1;
// }
// ByteArrayOutputStream out = new ByteArrayOutputStream();
// InputStream in = blobPattern.getBinaryStream();
// while(true) {
// int x = in.read();
// if(x < 0) {
// break;
// }
// out.write(x);
// }
// return position(out.toByteArray(), start);
// } catch(Throwable e) {
// throw logAndConvert(e);
// }
} }
/** /**
...@@ -246,6 +270,11 @@ public class JdbcBlob extends TraceObject implements Blob { ...@@ -246,6 +270,11 @@ public class JdbcBlob extends TraceObject implements Blob {
/** /**
* [Not supported] Returns the input stream, starting from an offset. * [Not supported] Returns the input stream, starting from an offset.
*
* @param pos where to start reading
* @param length the number of bytes that will be read
* @return the input stream to read
* @throws SQLException
*/ */
public InputStream getBinaryStream(long pos, long length) throws SQLException { public InputStream getBinaryStream(long pos, long length) throws SQLException {
debugCode("getBinaryStream("+pos+", "+length+");"); debugCode("getBinaryStream("+pos+", "+length+");");
......
...@@ -27,7 +27,6 @@ import java.sql.Timestamp; ...@@ -27,7 +27,6 @@ import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
import java.util.Map; import java.util.Map;
import org.h2.engine.SessionInterface;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
...@@ -37,8 +36,9 @@ import org.h2.message.TraceObject; ...@@ -37,8 +36,9 @@ import org.h2.message.TraceObject;
*/ */
public class JdbcCallableStatement extends JdbcPreparedStatement implements CallableStatement { public class JdbcCallableStatement extends JdbcPreparedStatement implements CallableStatement {
JdbcCallableStatement(SessionInterface session, JdbcConnection conn, String sql, int resultSetType, int id) throws SQLException { JdbcCallableStatement(JdbcConnection conn, String sql, int resultSetType, int id)
super(session, conn, sql, resultSetType, id, false); throws SQLException {
super(conn, sql, resultSetType, id, false);
setTrace(session.getTrace(), TraceObject.CALLABLE_STATEMENT, id); setTrace(session.getTrace(), TraceObject.CALLABLE_STATEMENT, id);
} }
......
...@@ -76,7 +76,7 @@ public class JdbcClob extends TraceObject implements Clob ...@@ -76,7 +76,7 @@ public class JdbcClob extends TraceObject implements Clob
} finally { } finally {
in.close(); in.close();
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -100,7 +100,7 @@ public class JdbcClob extends TraceObject implements Clob ...@@ -100,7 +100,7 @@ public class JdbcClob extends TraceObject implements Clob
checkClosed(); checkClosed();
String s = value.getString(); String s = value.getString();
return IOUtils.getInputStream(s); return IOUtils.getInputStream(s);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -123,7 +123,7 @@ public class JdbcClob extends TraceObject implements Clob ...@@ -123,7 +123,7 @@ public class JdbcClob extends TraceObject implements Clob
debugCodeCall("getCharacterStream"); debugCodeCall("getCharacterStream");
checkClosed(); checkClosed();
return value.getReader(); return value.getReader();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -168,7 +168,7 @@ public class JdbcClob extends TraceObject implements Clob ...@@ -168,7 +168,7 @@ public class JdbcClob extends TraceObject implements Clob
reader.close(); reader.close();
} }
return buff.toString(); return buff.toString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -118,7 +118,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -118,7 +118,7 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
this.url = ci.getURL(); this.url = ci.getURL();
openStackTrace = new Exception("Stack Trace"); openStackTrace = new Exception("Stack Trace");
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -149,8 +149,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -149,8 +149,8 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeAssign("Statement", TraceObject.STATEMENT, id, "createStatement()"); debugCodeAssign("Statement", TraceObject.STATEMENT, id, "createStatement()");
} }
checkClosed(); checkClosed();
return new JdbcStatement(session, this, ResultSet.TYPE_FORWARD_ONLY, id, false); return new JdbcStatement(this, ResultSet.TYPE_FORWARD_ONLY, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -170,8 +170,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -170,8 +170,8 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeAssign("Statement", TraceObject.STATEMENT, id, "createStatement(" + resultSetType + ", " + resultSetConcurrency + ")"); debugCodeAssign("Statement", TraceObject.STATEMENT, id, "createStatement(" + resultSetType + ", " + resultSetConcurrency + ")");
} }
checkClosed(); checkClosed();
return new JdbcStatement(session, this, resultSetType, id, false); return new JdbcStatement(this, resultSetType, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -194,8 +194,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -194,8 +194,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
checkHoldability(resultSetHoldability); checkHoldability(resultSetHoldability);
return new JdbcStatement(session, this, resultSetType, id, false); return new JdbcStatement(this, resultSetType, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -215,8 +215,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -215,8 +215,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcPreparedStatement(session, this, sql, ResultSet.TYPE_FORWARD_ONLY, id, false); return new JdbcPreparedStatement(this, sql, ResultSet.TYPE_FORWARD_ONLY, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -229,8 +229,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -229,8 +229,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcPreparedStatement(session, this, sql, ResultSet.TYPE_FORWARD_ONLY, id, true); return new JdbcPreparedStatement(this, sql, ResultSet.TYPE_FORWARD_ONLY, id, true);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -250,7 +250,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -250,7 +250,7 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
return new JdbcDatabaseMetaData(this, trace, id); return new JdbcDatabaseMetaData(this, trace, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -322,7 +322,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -322,7 +322,7 @@ public class JdbcConnection extends TraceObject implements Connection {
session = null; session = null;
} }
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -356,7 +356,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -356,7 +356,7 @@ public class JdbcConnection extends TraceObject implements Connection {
setAutoCommitFalse = prepareCommand("SET AUTOCOMMIT FALSE", setAutoCommitFalse); setAutoCommitFalse = prepareCommand("SET AUTOCOMMIT FALSE", setAutoCommitFalse);
setAutoCommitFalse.executeUpdate(); setAutoCommitFalse.executeUpdate();
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -373,7 +373,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -373,7 +373,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
debugCodeCall("getAutoCommit"); debugCodeCall("getAutoCommit");
return getInternalAutoCommit(); return getInternalAutoCommit();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -400,7 +400,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -400,7 +400,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
commit = prepareCommand("COMMIT", commit); commit = prepareCommand("COMMIT", commit);
commit.executeUpdate(); commit.executeUpdate();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -417,7 +417,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -417,7 +417,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall("rollback"); debugCodeCall("rollback");
checkClosed(); checkClosed();
rollbackInternal(); rollbackInternal();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -431,7 +431,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -431,7 +431,7 @@ public class JdbcConnection extends TraceObject implements Connection {
try { try {
debugCodeCall("isClosed"); debugCodeCall("isClosed");
return session == null || session.isClosed(); return session == null || session.isClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -448,7 +448,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -448,7 +448,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall("nativeSQL", sql); debugCodeCall("nativeSQL", sql);
checkClosed(); checkClosed();
return translateSQL(sql); return translateSQL(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -467,7 +467,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -467,7 +467,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("setReadOnly(" + readOnly + ");"); debugCode("setReadOnly(" + readOnly + ");");
} }
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -488,7 +488,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -488,7 +488,7 @@ public class JdbcConnection extends TraceObject implements Connection {
result.next(); result.next();
boolean readOnly = result.currentRow()[0].getBoolean().booleanValue(); boolean readOnly = result.currentRow()[0].getBoolean().booleanValue();
return readOnly; return readOnly;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -503,7 +503,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -503,7 +503,7 @@ public class JdbcConnection extends TraceObject implements Connection {
try { try {
debugCodeCall("setCatalog", catalog); debugCodeCall("setCatalog", catalog);
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -526,7 +526,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -526,7 +526,7 @@ public class JdbcConnection extends TraceObject implements Connection {
cat.close(); cat.close();
} }
return catalog; return catalog;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -541,7 +541,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -541,7 +541,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall("getWarnings"); debugCodeCall("getWarnings");
checkClosed(); checkClosed();
return null; return null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -553,7 +553,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -553,7 +553,7 @@ public class JdbcConnection extends TraceObject implements Connection {
try { try {
debugCodeCall("clearWarnings"); debugCodeCall("clearWarnings");
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -575,8 +575,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -575,8 +575,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcPreparedStatement(session, this, sql, resultSetType, id, false); return new JdbcPreparedStatement(this, sql, resultSetType, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -616,7 +616,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -616,7 +616,7 @@ public class JdbcConnection extends TraceObject implements Connection {
setLockMode = prepareCommand("SET LOCK_MODE ?", setLockMode); setLockMode = prepareCommand("SET LOCK_MODE ?", setLockMode);
((ParameterInterface) setLockMode.getParameters().get(0)).setValue(ValueInt.get(lockMode), false); ((ParameterInterface) setLockMode.getParameters().get(0)).setValue(ValueInt.get(lockMode), false);
setLockMode.executeUpdate(); setLockMode.executeUpdate();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -629,7 +629,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -629,7 +629,7 @@ public class JdbcConnection extends TraceObject implements Connection {
setQueryTimeout = prepareCommand("SET QUERY_TIMEOUT ?", setQueryTimeout); setQueryTimeout = prepareCommand("SET QUERY_TIMEOUT ?", setQueryTimeout);
((ParameterInterface) setQueryTimeout.getParameters().get(0)).setValue(ValueInt.get(seconds * 1000), false); ((ParameterInterface) setQueryTimeout.getParameters().get(0)).setValue(ValueInt.get(seconds * 1000), false);
setQueryTimeout.executeUpdate(); setQueryTimeout.executeUpdate();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -650,7 +650,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -650,7 +650,7 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
// round to the next second, otherwise 999 millis would return 0 seconds // round to the next second, otherwise 999 millis would return 0 seconds
return (queryTimeout + 999) / 1000; return (queryTimeout + 999) / 1000;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
...@@ -687,7 +687,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -687,7 +687,7 @@ public class JdbcConnection extends TraceObject implements Connection {
throw Message.getInternalError("lockMode:" + lockMode); throw Message.getInternalError("lockMode:" + lockMode);
} }
return transactionIsolationLevel; return transactionIsolationLevel;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -708,7 +708,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -708,7 +708,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
checkHoldability(holdability); checkHoldability(holdability);
this.holdability = holdability; this.holdability = holdability;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -724,7 +724,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -724,7 +724,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall("getHoldability"); debugCodeCall("getHoldability");
checkClosed(); checkClosed();
return holdability; return holdability;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -741,7 +741,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -741,7 +741,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCodeCall("getTypeMap"); debugCodeCall("getTypeMap");
checkClosed(); checkClosed();
return null; return null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -754,7 +754,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -754,7 +754,7 @@ public class JdbcConnection extends TraceObject implements Connection {
try { try {
debugCode("setTypeMap(" + quoteMap(map) + ");"); debugCode("setTypeMap(" + quoteMap(map) + ");");
checkMap(map); checkMap(map);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -774,8 +774,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -774,8 +774,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcCallableStatement(session, this, sql, ResultSet.TYPE_FORWARD_ONLY, id); return new JdbcCallableStatement(this, sql, ResultSet.TYPE_FORWARD_ONLY, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -797,8 +797,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -797,8 +797,8 @@ public class JdbcConnection extends TraceObject implements Connection {
} }
checkClosed(); checkClosed();
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcCallableStatement(session, this, sql, resultSetType, id); return new JdbcCallableStatement(this, sql, resultSetType, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -824,8 +824,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -824,8 +824,8 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
checkHoldability(resultSetHoldability); checkHoldability(resultSetHoldability);
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcCallableStatement(session, this, sql, resultSetType, id); return new JdbcCallableStatement(this, sql, resultSetType, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -848,7 +848,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -848,7 +848,7 @@ public class JdbcConnection extends TraceObject implements Connection {
JdbcSavepoint savepoint = new JdbcSavepoint(this, savepointId, null, trace, id); JdbcSavepoint savepoint = new JdbcSavepoint(this, savepointId, null, trace, id);
savepointId++; savepointId++;
return savepoint; return savepoint;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -871,7 +871,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -871,7 +871,7 @@ public class JdbcConnection extends TraceObject implements Connection {
set.executeUpdate(); set.executeUpdate();
JdbcSavepoint savepoint = new JdbcSavepoint(this, 0, name, trace, id); JdbcSavepoint savepoint = new JdbcSavepoint(this, 0, name, trace, id);
return savepoint; return savepoint;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -887,7 +887,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -887,7 +887,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("rollback(" + sp.getTraceObjectName() + ");"); debugCode("rollback(" + sp.getTraceObjectName() + ");");
checkClosed(); checkClosed();
sp.rollback(); sp.rollback();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -902,7 +902,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -902,7 +902,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("releaseSavepoint(savepoint);"); debugCode("releaseSavepoint(savepoint);");
checkClosed(); checkClosed();
convertSavepoint(savepoint).release(); convertSavepoint(savepoint).release();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -934,8 +934,8 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -934,8 +934,8 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
checkHoldability(resultSetHoldability); checkHoldability(resultSetHoldability);
sql = translateSQL(sql); sql = translateSQL(sql);
return new JdbcPreparedStatement(session, this, sql, resultSetType, id, false); return new JdbcPreparedStatement(this, sql, resultSetType, id, false);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -954,7 +954,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -954,7 +954,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("prepareStatement(" + quote(sql) + ", " + autoGeneratedKeys + ");"); debugCode("prepareStatement(" + quote(sql) + ", " + autoGeneratedKeys + ");");
} }
return prepareStatement(sql); return prepareStatement(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -973,7 +973,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -973,7 +973,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("prepareStatement(" + quote(sql) + ", " + quoteIntArray(columnIndexes) + ");"); debugCode("prepareStatement(" + quote(sql) + ", " + quoteIntArray(columnIndexes) + ");");
} }
return prepareStatement(sql); return prepareStatement(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -992,7 +992,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -992,7 +992,7 @@ public class JdbcConnection extends TraceObject implements Connection {
debugCode("prepareStatement(" + quote(sql) + ", " + quoteArray(columnNames) + ");"); debugCode("prepareStatement(" + quote(sql) + ", " + quoteArray(columnNames) + ");");
} }
return prepareStatement(sql); return prepareStatement(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1006,7 +1006,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1006,7 +1006,7 @@ public class JdbcConnection extends TraceObject implements Connection {
Class clazz = java.sql.Savepoint.class; Class clazz = java.sql.Savepoint.class;
clazz.getClass(); clazz.getClass();
//## Java 1.4 end ## //## Java 1.4 end ##
} catch (Throwable e) { } catch (Exception e) {
throw Message.getSQLException(ErrorCode.UNSUPPORTED_JAVA_VERSION); throw Message.getSQLException(ErrorCode.UNSUPPORTED_JAVA_VERSION);
} }
} }
...@@ -1297,7 +1297,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1297,7 +1297,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
ValueLob v = ValueLob.createSmallLob(Value.CLOB, new byte[0]); ValueLob v = ValueLob.createSmallLob(Value.CLOB, new byte[0]);
return new JdbcClob(session, this, v, id); return new JdbcClob(session, this, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1314,7 +1314,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1314,7 +1314,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
ValueLob v = ValueLob.createSmallLob(Value.BLOB, new byte[0]); ValueLob v = ValueLob.createSmallLob(Value.BLOB, new byte[0]);
return new JdbcBlob(session, this, v, id); return new JdbcBlob(session, this, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1332,7 +1332,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1332,7 +1332,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
ValueLob v = ValueLob.createSmallLob(Value.CLOB, new byte[0]); ValueLob v = ValueLob.createSmallLob(Value.CLOB, new byte[0]);
return new JdbcClob(session, this, v, id); return new JdbcClob(session, this, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1378,7 +1378,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1378,7 +1378,7 @@ public class JdbcConnection extends TraceObject implements Connection {
checkClosed(); checkClosed();
getInternalAutoCommit(); getInternalAutoCommit();
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
// this method doesn't throw an exception, but it logs it // this method doesn't throw an exception, but it logs it
logAndConvert(e); logAndConvert(e);
return false; return false;
......
...@@ -159,7 +159,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -159,7 +159,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(4 + i, types[i]); prep.setString(4 + i, types[i]);
} }
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -241,7 +241,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -241,7 +241,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(3, getPattern(tableNamePattern)); prep.setString(3, getPattern(tableNamePattern));
prep.setString(4, getPattern(columnNamePattern)); prep.setString(4, getPattern(columnNamePattern));
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -319,7 +319,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -319,7 +319,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schema)); prep.setString(2, getSchemaPattern(schema));
prep.setString(3, tableName); prep.setString(3, tableName);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -369,7 +369,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -369,7 +369,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schema)); prep.setString(2, getSchemaPattern(schema));
prep.setString(3, tableName); prep.setString(3, tableName);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -403,7 +403,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -403,7 +403,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
try { try {
debugCodeCall("getURL"); debugCodeCall("getURL");
return conn.getURL(); return conn.getURL();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -418,7 +418,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -418,7 +418,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
try { try {
debugCodeCall("getUserName"); debugCodeCall("getUserName");
return conn.getUser(); return conn.getUser();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -432,7 +432,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -432,7 +432,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
try { try {
debugCodeCall("isReadOnly"); debugCodeCall("isReadOnly");
return conn.isReadOnly(); return conn.isReadOnly();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -538,7 +538,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -538,7 +538,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schemaPattern)); prep.setString(2, getSchemaPattern(schemaPattern));
prep.setString(3, getPattern(procedureNamePattern)); prep.setString(3, getPattern(procedureNamePattern));
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -600,7 +600,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -600,7 +600,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(3, getPattern(procedureNamePattern)); prep.setString(3, getPattern(procedureNamePattern));
prep.setString(4, getPattern(columnNamePattern)); prep.setString(4, getPattern(columnNamePattern));
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -630,7 +630,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -630,7 +630,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "FROM INFORMATION_SCHEMA.SCHEMATA " + "FROM INFORMATION_SCHEMA.SCHEMATA "
+ "ORDER BY SCHEMA_NAME"); + "ORDER BY SCHEMA_NAME");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -654,7 +654,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -654,7 +654,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
"SELECT CATALOG_NAME TABLE_CAT " "SELECT CATALOG_NAME TABLE_CAT "
+ "FROM INFORMATION_SCHEMA.CATALOGS"); + "FROM INFORMATION_SCHEMA.CATALOGS");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -680,7 +680,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -680,7 +680,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "FROM INFORMATION_SCHEMA.TABLE_TYPES " + "FROM INFORMATION_SCHEMA.TABLE_TYPES "
+ "ORDER BY TABLE_TYPE"); + "ORDER BY TABLE_TYPE");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -742,7 +742,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -742,7 +742,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(3, table); prep.setString(3, table);
prep.setString(4, getPattern(columnNamePattern)); prep.setString(4, getPattern(columnNamePattern));
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -797,7 +797,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -797,7 +797,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schemaPattern)); prep.setString(2, getSchemaPattern(schemaPattern));
prep.setString(3, getPattern(tableNamePattern)); prep.setString(3, getPattern(tableNamePattern));
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -862,7 +862,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -862,7 +862,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(4, getSchemaPattern(schema)); prep.setString(4, getSchemaPattern(schema));
prep.setString(5, tableName); prep.setString(5, tableName);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -909,7 +909,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -909,7 +909,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "FROM INFORMATION_SCHEMA.COLUMNS " + "FROM INFORMATION_SCHEMA.COLUMNS "
+ "WHERE FALSE"); + "WHERE FALSE");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -978,7 +978,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -978,7 +978,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schema)); prep.setString(2, getSchemaPattern(schema));
prep.setString(3, tableName); prep.setString(3, tableName);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1048,7 +1048,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -1048,7 +1048,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(2, getSchemaPattern(schema)); prep.setString(2, getSchemaPattern(schema));
prep.setString(3, tableName); prep.setString(3, tableName);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1134,7 +1134,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -1134,7 +1134,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
prep.setString(5, getSchemaPattern(foreignSchema)); prep.setString(5, getSchemaPattern(foreignSchema));
prep.setString(6, foreignTable); prep.setString(6, foreignTable);
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1182,7 +1182,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -1182,7 +1182,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "FROM INFORMATION_SCHEMA.CATALOGS " + "FROM INFORMATION_SCHEMA.CATALOGS "
+ "WHERE FALSE"); + "WHERE FALSE");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1244,7 +1244,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -1244,7 +1244,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "ORDER BY DATA_TYPE, POS"); + "ORDER BY DATA_TYPE, POS");
ResultSet rs = prep.executeQuery(); ResultSet rs = prep.executeQuery();
return rs; return rs;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1356,7 +1356,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -1356,7 +1356,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
rs.close(); rs.close();
prep.close(); prep.close();
return buff.toString(); return buff.toString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2463,7 +2463,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2463,7 +2463,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+quote(typeNamePattern)+");"); +quote(typeNamePattern)+");");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2499,7 +2499,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2499,7 +2499,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+ "FROM INFORMATION_SCHEMA.CATALOGS " + "FROM INFORMATION_SCHEMA.CATALOGS "
+ "WHERE FALSE"); + "WHERE FALSE");
return prep.executeQuery(); return prep.executeQuery();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2519,7 +2519,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2519,7 +2519,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
+quote(attributeNamePattern)+");"); +quote(attributeNamePattern)+");");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -49,7 +49,7 @@ implements ParameterMetaData ...@@ -49,7 +49,7 @@ implements ParameterMetaData
debugCodeCall("getParameterCount"); debugCodeCall("getParameterCount");
checkClosed(); checkClosed();
return paramCount; return paramCount;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -67,7 +67,7 @@ implements ParameterMetaData ...@@ -67,7 +67,7 @@ implements ParameterMetaData
debugCodeCall("getParameterMode", param); debugCodeCall("getParameterMode", param);
getParameter(param); getParameter(param);
return parameterModeIn; return parameterModeIn;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -89,7 +89,7 @@ implements ParameterMetaData ...@@ -89,7 +89,7 @@ implements ParameterMetaData
type = Value.STRING; type = Value.STRING;
} }
return DataType.getDataType(type).sqlType; return DataType.getDataType(type).sqlType;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -106,7 +106,7 @@ implements ParameterMetaData ...@@ -106,7 +106,7 @@ implements ParameterMetaData
debugCodeCall("getPrecision", param); debugCodeCall("getPrecision", param);
ParameterInterface p = getParameter(param); ParameterInterface p = getParameter(param);
return MathUtils.convertLongToInt(p.getPrecision()); return MathUtils.convertLongToInt(p.getPrecision());
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -123,7 +123,7 @@ implements ParameterMetaData ...@@ -123,7 +123,7 @@ implements ParameterMetaData
debugCodeCall("getScale", param); debugCodeCall("getScale", param);
ParameterInterface p = getParameter(param); ParameterInterface p = getParameter(param);
return p.getScale(); return p.getScale();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -139,7 +139,7 @@ implements ParameterMetaData ...@@ -139,7 +139,7 @@ implements ParameterMetaData
try { try {
debugCodeCall("isNullable", param); debugCodeCall("isNullable", param);
return getParameter(param).getNullable(); return getParameter(param).getNullable();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -156,7 +156,7 @@ implements ParameterMetaData ...@@ -156,7 +156,7 @@ implements ParameterMetaData
debugCodeCall("isSigned", param); debugCodeCall("isSigned", param);
getParameter(param); getParameter(param);
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -177,7 +177,7 @@ implements ParameterMetaData ...@@ -177,7 +177,7 @@ implements ParameterMetaData
type = Value.STRING; type = Value.STRING;
} }
return DataType.getTypeClassName(type); return DataType.getTypeClassName(type);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -198,7 +198,7 @@ implements ParameterMetaData ...@@ -198,7 +198,7 @@ implements ParameterMetaData
type = Value.STRING; type = Value.STRING;
} }
return DataType.getDataType(type).name; return DataType.getDataType(type).name;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -26,7 +26,6 @@ import java.util.Calendar; ...@@ -26,7 +26,6 @@ import java.util.Calendar;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.engine.SessionInterface;
import org.h2.expression.ParameterInterface; import org.h2.expression.ParameterInterface;
import org.h2.message.Message; import org.h2.message.Message;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
...@@ -66,8 +65,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -66,8 +65,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
private CommandInterface command; private CommandInterface command;
private ObjectArray batchParameters; private ObjectArray batchParameters;
JdbcPreparedStatement(SessionInterface session, JdbcConnection conn, String sql, int resultSetType, int id, boolean closeWithResultSet) throws SQLException { JdbcPreparedStatement(JdbcConnection conn, String sql, int resultSetType, int id,
super(session, conn, resultSetType, id, closeWithResultSet); boolean closeWithResultSet) throws SQLException {
super(conn, resultSetType, id, closeWithResultSet);
setTrace(session.getTrace(), TraceObject.PREPARED_STATEMENT, id); setTrace(session.getTrace(), TraceObject.PREPARED_STATEMENT, id);
command = conn.prepareCommand(sql, fetchSize); command = conn.prepareCommand(sql, fetchSize);
} }
...@@ -98,9 +98,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -98,9 +98,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
setExecutingStatement(null); setExecutingStatement(null);
} }
} }
resultSet = new JdbcResultSet(session, conn, this, result, id, closedByResultSet, scrollable); resultSet = new JdbcResultSet(conn, this, result, id, closedByResultSet, scrollable);
return resultSet; return resultSet;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -124,7 +124,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -124,7 +124,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCodeCall("executeUpdate"); debugCodeCall("executeUpdate");
checkClosed(); checkClosed();
return executeUpdateInternal(); return executeUpdateInternal();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -167,7 +167,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -167,7 +167,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
returnsResultSet = true; returnsResultSet = true;
boolean scrollable = resultSetType != ResultSet.TYPE_FORWARD_ONLY; boolean scrollable = resultSetType != ResultSet.TYPE_FORWARD_ONLY;
ResultInterface result = command.executeQuery(maxRows, scrollable); ResultInterface result = command.executeQuery(maxRows, scrollable);
resultSet = new JdbcResultSet(session, conn, this, result, id, closedByResultSet, scrollable); resultSet = new JdbcResultSet(conn, this, result, id, closedByResultSet, scrollable);
} else { } else {
returnsResultSet = false; returnsResultSet = false;
updateCount = command.executeUpdate(); updateCount = command.executeUpdate();
...@@ -177,7 +177,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -177,7 +177,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
} }
return returnsResultSet; return returnsResultSet;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -197,7 +197,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -197,7 +197,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
// can only delete old temp files if they are not in the batch // can only delete old temp files if they are not in the batch
param.setValue(null, batchParameters == null); param.setValue(null, batchParameters == null);
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -211,7 +211,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -211,7 +211,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
try { try {
debugCodeCall("executeQuery", sql); debugCodeCall("executeQuery", sql);
throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -225,7 +225,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -225,7 +225,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
try { try {
debugCodeCall("addBatch", sql); debugCodeCall("addBatch", sql);
throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -239,7 +239,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -239,7 +239,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
try { try {
debugCodeCall("executeUpdate", sql); debugCodeCall("executeUpdate", sql);
throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -253,7 +253,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -253,7 +253,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
try { try {
debugCodeCall("execute", sql); debugCodeCall("execute", sql);
throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -273,7 +273,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -273,7 +273,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setNull("+parameterIndex+", "+sqlType+");"); debugCode("setNull("+parameterIndex+", "+sqlType+");");
} }
setParameter(parameterIndex, ValueNull.INSTANCE); setParameter(parameterIndex, ValueNull.INSTANCE);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -291,7 +291,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -291,7 +291,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setInt("+parameterIndex+", "+x+");"); debugCode("setInt("+parameterIndex+", "+x+");");
} }
setParameter(parameterIndex, ValueInt.get(x)); setParameter(parameterIndex, ValueInt.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -310,7 +310,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -310,7 +310,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -329,7 +329,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -329,7 +329,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -348,7 +348,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -348,7 +348,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -367,7 +367,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -367,7 +367,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -386,7 +386,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -386,7 +386,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -409,7 +409,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -409,7 +409,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} else { } else {
setParameter(parameterIndex, DataType.convertToValue(session, x, Value.UNKNOWN)); setParameter(parameterIndex, DataType.convertToValue(session, x, Value.UNKNOWN));
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -435,7 +435,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -435,7 +435,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
Value v = DataType.convertToValue(session, x, type); Value v = DataType.convertToValue(session, x, type);
setParameter(parameterIndex, v.convertTo(type)); setParameter(parameterIndex, v.convertTo(type));
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -456,7 +456,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -456,7 +456,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setObject("+parameterIndex+", x, "+targetSqlType+", "+scale+");"); debugCode("setObject("+parameterIndex+", x, "+targetSqlType+", "+scale+");");
} }
setObject(parameterIndex, x, targetSqlType); setObject(parameterIndex, x, targetSqlType);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -474,7 +474,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -474,7 +474,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setBoolean("+parameterIndex+", "+x+");"); debugCode("setBoolean("+parameterIndex+", "+x+");");
} }
setParameter(parameterIndex, ValueBoolean.get(x)); setParameter(parameterIndex, ValueBoolean.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -492,7 +492,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -492,7 +492,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setByte("+parameterIndex+", "+x+");"); debugCode("setByte("+parameterIndex+", "+x+");");
} }
setParameter(parameterIndex, ValueByte.get(x)); setParameter(parameterIndex, ValueByte.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -510,7 +510,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -510,7 +510,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setShort("+parameterIndex+", (short) "+x+");"); debugCode("setShort("+parameterIndex+", (short) "+x+");");
} }
setParameter(parameterIndex, ValueShort.get(x)); setParameter(parameterIndex, ValueShort.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -528,7 +528,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -528,7 +528,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setLong("+parameterIndex+", "+x+"L);"); debugCode("setLong("+parameterIndex+", "+x+"L);");
} }
setParameter(parameterIndex, ValueLong.get(x)); setParameter(parameterIndex, ValueLong.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -546,7 +546,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -546,7 +546,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setFloat("+parameterIndex+", "+x+"f);"); debugCode("setFloat("+parameterIndex+", "+x+"f);");
} }
setParameter(parameterIndex, ValueFloat.get(x)); setParameter(parameterIndex, ValueFloat.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -564,7 +564,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -564,7 +564,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setDouble("+parameterIndex+", "+x+"d);"); debugCode("setDouble("+parameterIndex+", "+x+"d);");
} }
setParameter(parameterIndex, ValueDouble.get(x)); setParameter(parameterIndex, ValueDouble.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -578,7 +578,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -578,7 +578,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setRef("+parameterIndex+", x);"); debugCode("setRef("+parameterIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -602,7 +602,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -602,7 +602,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} else { } else {
setParameter(parameterIndex, DateTimeUtils.convertDateToUniversal(x, calendar)); setParameter(parameterIndex, DateTimeUtils.convertDateToUniversal(x, calendar));
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -626,7 +626,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -626,7 +626,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} else { } else {
setParameter(parameterIndex, DateTimeUtils.convertTimeToUniversal(x, calendar)); setParameter(parameterIndex, DateTimeUtils.convertTimeToUniversal(x, calendar));
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -650,7 +650,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -650,7 +650,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} else { } else {
setParameter(parameterIndex, DateTimeUtils.convertTimestampToUniversal(x, calendar)); setParameter(parameterIndex, DateTimeUtils.convertTimestampToUniversal(x, calendar));
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -665,7 +665,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -665,7 +665,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setUnicodeStream("+parameterIndex+", x, "+length+");"); debugCode("setUnicodeStream("+parameterIndex+", x, "+length+");");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -684,7 +684,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -684,7 +684,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setNull("+parameterIndex+", "+sqlType+", "+quote(typeName)+");"); debugCode("setNull("+parameterIndex+", "+sqlType+", "+quote(typeName)+");");
} }
setNull(parameterIndex, sqlType); setNull(parameterIndex, sqlType);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -709,7 +709,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -709,7 +709,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
v = conn.createBlob(x.getBinaryStream(), -1); v = conn.createBlob(x.getBinaryStream(), -1);
} }
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -729,7 +729,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -729,7 +729,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createBlob(x, -1); Value v = conn.createBlob(x, -1);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -754,7 +754,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -754,7 +754,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
v = conn.createClob(x.getCharacterStream(), -1); v = conn.createClob(x.getCharacterStream(), -1);
} }
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -779,7 +779,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -779,7 +779,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
v = conn.createClob(x, -1); v = conn.createClob(x, -1);
} }
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -793,7 +793,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -793,7 +793,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setArray("+parameterIndex+", x);"); debugCode("setArray("+parameterIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -812,7 +812,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -812,7 +812,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -833,7 +833,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -833,7 +833,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createBlob(x, length); Value v = conn.createBlob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -889,7 +889,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -889,7 +889,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(IOUtils.getAsciiReader(x), length); Value v = conn.createClob(IOUtils.getAsciiReader(x), length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -944,7 +944,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -944,7 +944,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -958,7 +958,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -958,7 +958,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("setURL("+parameterIndex+", x);"); debugCode("setURL("+parameterIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -985,7 +985,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -985,7 +985,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
String catalog = conn.getCatalog(); String catalog = conn.getCatalog();
JdbcResultSetMetaData meta = new JdbcResultSetMetaData(null, this, result, catalog, session.getTrace(), id); JdbcResultSetMetaData meta = new JdbcResultSetMetaData(null, this, result, catalog, session.getTrace(), id);
return meta; return meta;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -998,7 +998,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -998,7 +998,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCodeCall("clearBatch"); debugCodeCall("clearBatch");
checkClosed(); checkClosed();
batchParameters = null; batchParameters = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1016,7 +1016,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1016,7 +1016,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
command.close(); command.close();
command = null; command = null;
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1068,7 +1068,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1068,7 +1068,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
throw e; throw e;
} }
return result; return result;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1091,7 +1091,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1091,7 +1091,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
batchParameters = new ObjectArray(); batchParameters = new ObjectArray();
} }
batchParameters.add(set); batchParameters.add(set);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1107,7 +1107,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1107,7 +1107,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");"); debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");");
} }
throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT); throw Message.getSQLException(ErrorCode.METHOD_NOT_ALLOWED_FOR_PREPARED_STATEMENT);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1208,7 +1208,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1208,7 +1208,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
JdbcParameterMetaData meta = new JdbcParameterMetaData(session, this, command, id); JdbcParameterMetaData meta = new JdbcParameterMetaData(session, this, command, id);
return meta; return meta;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1251,7 +1251,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1251,7 +1251,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
} }
Value v = x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x); Value v = x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1272,7 +1272,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1272,7 +1272,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1309,7 +1309,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1309,7 +1309,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
v = conn.createClob(x.getCharacterStream(), -1); v = conn.createClob(x.getCharacterStream(), -1);
} }
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1330,7 +1330,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1330,7 +1330,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(x, -1); Value v = conn.createClob(x, -1);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1350,7 +1350,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1350,7 +1350,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1370,7 +1370,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1370,7 +1370,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createBlob(x, length); Value v = conn.createBlob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1390,7 +1390,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1390,7 +1390,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
setParameter(parameterIndex, v); setParameter(parameterIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -81,9 +81,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -81,9 +81,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
private Value[] updateRow; private Value[] updateRow;
private HashMap columnNameMap; private HashMap columnNameMap;
JdbcResultSet(SessionInterface session, JdbcConnection conn, JdbcStatement stat, ResultInterface result, int id, boolean closeStatement, boolean scrollable) { JdbcResultSet(JdbcConnection conn, JdbcStatement stat, ResultInterface result, int id,
boolean closeStatement, boolean scrollable) {
this.session = conn.getSession();
setTrace(session.getTrace(), TraceObject.RESULT_SET, id); setTrace(session.getTrace(), TraceObject.RESULT_SET, id);
this.session = session;
this.conn = conn; this.conn = conn;
this.stat = stat; this.stat = stat;
this.result = result; this.result = result;
...@@ -102,7 +103,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -102,7 +103,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("next"); debugCodeCall("next");
checkClosed(); checkClosed();
return nextRow(); return nextRow();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -122,7 +123,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -122,7 +123,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
String catalog = conn.getCatalog(); String catalog = conn.getCatalog();
JdbcResultSetMetaData meta = new JdbcResultSetMetaData(this, null, result, catalog, session.getTrace(), id); JdbcResultSetMetaData meta = new JdbcResultSetMetaData(this, null, result, catalog, session.getTrace(), id);
return meta; return meta;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -137,7 +138,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -137,7 +138,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("wasNull"); debugCodeCall("wasNull");
checkClosed(); checkClosed();
return wasNull; return wasNull;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -155,7 +156,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -155,7 +156,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("findColumn", columnName); debugCodeCall("findColumn", columnName);
return getColumnIndex(columnName); return getColumnIndex(columnName);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -167,7 +168,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -167,7 +168,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("close"); debugCodeCall("close");
closeInternal(); closeInternal();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -205,7 +206,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -205,7 +206,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
return null; return null;
} }
return stat; return stat;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -220,7 +221,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -220,7 +221,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getWarnings"); debugCodeCall("getWarnings");
checkClosed(); checkClosed();
return null; return null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -232,7 +233,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -232,7 +233,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("clearWarnings"); debugCodeCall("clearWarnings");
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -250,7 +251,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -250,7 +251,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getString", columnIndex); debugCodeCall("getString", columnIndex);
return get(columnIndex).getString(); return get(columnIndex).getString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -266,7 +267,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -266,7 +267,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getString", columnName); debugCodeCall("getString", columnName);
return get(columnName).getString(); return get(columnName).getString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -282,7 +283,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -282,7 +283,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getInt", columnIndex); debugCodeCall("getInt", columnIndex);
return get(columnIndex).getInt(); return get(columnIndex).getInt();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -298,7 +299,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -298,7 +299,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getInt", columnName); debugCodeCall("getInt", columnName);
return get(columnName).getInt(); return get(columnName).getInt();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -314,7 +315,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -314,7 +315,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBigDecimal", columnIndex); debugCodeCall("getBigDecimal", columnIndex);
return get(columnIndex).getBigDecimal(); return get(columnIndex).getBigDecimal();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -330,7 +331,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -330,7 +331,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getDate", columnIndex); debugCodeCall("getDate", columnIndex);
return get(columnIndex).getDate(); return get(columnIndex).getDate();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -346,7 +347,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -346,7 +347,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getTime", columnIndex); debugCodeCall("getTime", columnIndex);
return get(columnIndex).getTime(); return get(columnIndex).getTime();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -362,7 +363,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -362,7 +363,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getTimestamp", columnIndex); debugCodeCall("getTimestamp", columnIndex);
return get(columnIndex).getTimestamp(); return get(columnIndex).getTimestamp();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -378,7 +379,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -378,7 +379,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBigDecimal", columnName); debugCodeCall("getBigDecimal", columnName);
return get(columnName).getBigDecimal(); return get(columnName).getBigDecimal();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -394,7 +395,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -394,7 +395,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getDate", columnName); debugCodeCall("getDate", columnName);
return get(columnName).getDate(); return get(columnName).getDate();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -410,7 +411,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -410,7 +411,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getTime", columnName); debugCodeCall("getTime", columnName);
return get(columnName).getTime(); return get(columnName).getTime();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -426,7 +427,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -426,7 +427,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getTimestamp", columnName); debugCodeCall("getTimestamp", columnName);
return get(columnName).getTimestamp(); return get(columnName).getTimestamp();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -450,7 +451,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -450,7 +451,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
} }
return v.getObject(); return v.getObject();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -474,7 +475,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -474,7 +475,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
} }
return v.getObject(); return v.getObject();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -492,7 +493,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -492,7 +493,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getBoolean", columnIndex); debugCodeCall("getBoolean", columnIndex);
Boolean v = get(columnIndex).getBoolean(); Boolean v = get(columnIndex).getBoolean();
return v == null ? false : v.booleanValue(); return v == null ? false : v.booleanValue();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -510,7 +511,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -510,7 +511,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getBoolean", columnName); debugCodeCall("getBoolean", columnName);
Boolean v = get(columnName).getBoolean(); Boolean v = get(columnName).getBoolean();
return v == null ? false : v.booleanValue(); return v == null ? false : v.booleanValue();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -527,7 +528,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -527,7 +528,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getByte", columnIndex); debugCodeCall("getByte", columnIndex);
return get(columnIndex).getByte(); return get(columnIndex).getByte();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -544,7 +545,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -544,7 +545,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getByte", columnName); debugCodeCall("getByte", columnName);
return get(columnName).getByte(); return get(columnName).getByte();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -561,7 +562,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -561,7 +562,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getShort", columnIndex); debugCodeCall("getShort", columnIndex);
return get(columnIndex).getShort(); return get(columnIndex).getShort();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -578,7 +579,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -578,7 +579,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getShort", columnName); debugCodeCall("getShort", columnName);
return get(columnName).getShort(); return get(columnName).getShort();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -595,7 +596,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -595,7 +596,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getLong", columnIndex); debugCodeCall("getLong", columnIndex);
return get(columnIndex).getLong(); return get(columnIndex).getLong();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -612,7 +613,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -612,7 +613,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getLong", columnName); debugCodeCall("getLong", columnName);
return get(columnName).getLong(); return get(columnName).getLong();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -629,7 +630,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -629,7 +630,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getFloat", columnIndex); debugCodeCall("getFloat", columnIndex);
return get(columnIndex).getFloat(); return get(columnIndex).getFloat();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -646,7 +647,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -646,7 +647,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getFloat", columnName); debugCodeCall("getFloat", columnName);
return get(columnName).getFloat(); return get(columnName).getFloat();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -663,7 +664,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -663,7 +664,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getDouble", columnIndex); debugCodeCall("getDouble", columnIndex);
return get(columnIndex).getDouble(); return get(columnIndex).getDouble();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -680,7 +681,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -680,7 +681,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getDouble", columnName); debugCodeCall("getDouble", columnName);
return get(columnName).getDouble(); return get(columnName).getDouble();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -705,7 +706,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -705,7 +706,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
BigDecimal bd = get(columnName).getBigDecimal(); BigDecimal bd = get(columnName).getBigDecimal();
return bd == null ? null : MathUtils.setScale(bd, scale); return bd == null ? null : MathUtils.setScale(bd, scale);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -730,7 +731,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -730,7 +731,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
BigDecimal bd = get(columnIndex).getBigDecimal(); BigDecimal bd = get(columnIndex).getBigDecimal();
return bd == null ? null : MathUtils.setScale(bd, scale); return bd == null ? null : MathUtils.setScale(bd, scale);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -743,7 +744,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -743,7 +744,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getUnicodeStream", columnIndex); debugCodeCall("getUnicodeStream", columnIndex);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -756,7 +757,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -756,7 +757,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getUnicodeStream", columnName); debugCodeCall("getUnicodeStream", columnName);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -771,7 +772,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -771,7 +772,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("getObject(" + columnIndex + ", map);"); debugCode("getObject(" + columnIndex + ", map);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -786,7 +787,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -786,7 +787,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("getObject(" + quote(columnName) + ", map);"); debugCode("getObject(" + quote(columnName) + ", map);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -798,7 +799,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -798,7 +799,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getRef", columnIndex); debugCodeCall("getRef", columnIndex);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -810,7 +811,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -810,7 +811,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getRef", columnName); debugCodeCall("getRef", columnName);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -832,7 +833,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -832,7 +833,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Date x = get(columnIndex).getDate(); Date x = get(columnIndex).getDate();
return DateTimeUtils.convertDateToCalendar(x, calendar); return DateTimeUtils.convertDateToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -854,7 +855,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -854,7 +855,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Date x = get(columnName).getDate(); Date x = get(columnName).getDate();
return DateTimeUtils.convertDateToCalendar(x, calendar); return DateTimeUtils.convertDateToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -876,7 +877,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -876,7 +877,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Time x = get(columnIndex).getTime(); Time x = get(columnIndex).getTime();
return DateTimeUtils.convertTimeToCalendar(x, calendar); return DateTimeUtils.convertTimeToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -898,7 +899,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -898,7 +899,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Time x = get(columnName).getTime(); Time x = get(columnName).getTime();
return DateTimeUtils.convertTimeToCalendar(x, calendar); return DateTimeUtils.convertTimeToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -920,7 +921,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -920,7 +921,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Timestamp x = get(columnIndex).getTimestamp(); Timestamp x = get(columnIndex).getTimestamp();
return DateTimeUtils.convertTimestampToCalendar(x, calendar); return DateTimeUtils.convertTimestampToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -941,7 +942,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -941,7 +942,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
Timestamp x = get(columnName).getTimestamp(); Timestamp x = get(columnName).getTimestamp();
return DateTimeUtils.convertTimestampToCalendar(x, calendar); return DateTimeUtils.convertTimestampToCalendar(x, calendar);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -960,7 +961,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -960,7 +961,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Blob", TraceObject.BLOB, id, "getBlob(" + columnIndex + ")"); debugCodeAssign("Blob", TraceObject.BLOB, id, "getBlob(" + columnIndex + ")");
Value v = get(columnIndex); Value v = get(columnIndex);
return v == ValueNull.INSTANCE ? null : new JdbcBlob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcBlob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -979,7 +980,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -979,7 +980,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Blob", TraceObject.BLOB, id, "getBlob(" + quote(columnName) + ")"); debugCodeAssign("Blob", TraceObject.BLOB, id, "getBlob(" + quote(columnName) + ")");
Value v = get(columnName); Value v = get(columnName);
return v == ValueNull.INSTANCE ? null : new JdbcBlob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcBlob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -996,7 +997,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -996,7 +997,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBytes", columnIndex); debugCodeCall("getBytes", columnIndex);
return get(columnIndex).getBytes(); return get(columnIndex).getBytes();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1013,7 +1014,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1013,7 +1014,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBytes", columnName); debugCodeCall("getBytes", columnName);
return get(columnName).getBytes(); return get(columnName).getBytes();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1030,7 +1031,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1030,7 +1031,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBinaryStream", columnIndex); debugCodeCall("getBinaryStream", columnIndex);
return get(columnIndex).getInputStream(); return get(columnIndex).getInputStream();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1047,7 +1048,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1047,7 +1048,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getBinaryStream", columnName); debugCodeCall("getBinaryStream", columnName);
return get(columnName).getInputStream(); return get(columnName).getInputStream();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1067,7 +1068,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1067,7 +1068,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Clob", TraceObject.CLOB, id, "getClob(" + columnIndex + ")"); debugCodeAssign("Clob", TraceObject.CLOB, id, "getClob(" + columnIndex + ")");
Value v = get(columnIndex); Value v = get(columnIndex);
return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1086,7 +1087,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1086,7 +1087,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Clob", TraceObject.CLOB, id, "getClob(" + quote(columnName) + ")"); debugCodeAssign("Clob", TraceObject.CLOB, id, "getClob(" + quote(columnName) + ")");
Value v = get(columnName); Value v = get(columnName);
return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1105,7 +1106,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1105,7 +1106,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Clob", TraceObject.ARRAY, id, "getArray(" + columnIndex + ")"); debugCodeAssign("Clob", TraceObject.ARRAY, id, "getArray(" + columnIndex + ")");
Value v = get(columnIndex); Value v = get(columnIndex);
return v == ValueNull.INSTANCE ? null : new JdbcArray(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcArray(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1124,7 +1125,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1124,7 +1125,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("Clob", TraceObject.ARRAY, id, "getArray(" + quote(columnName) + ")"); debugCodeAssign("Clob", TraceObject.ARRAY, id, "getArray(" + quote(columnName) + ")");
Value v = get(columnName); Value v = get(columnName);
return v == ValueNull.INSTANCE ? null : new JdbcArray(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcArray(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1143,7 +1144,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1143,7 +1144,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
String s = get(columnIndex).getString(); String s = get(columnIndex).getString();
// TODO ascii stream: convert the reader to a ascii stream // TODO ascii stream: convert the reader to a ascii stream
return s == null ? null : IOUtils.getInputStream(s); return s == null ? null : IOUtils.getInputStream(s);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1162,7 +1163,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1162,7 +1163,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
String s = get(columnName).getString(); String s = get(columnName).getString();
// TODO ascii stream: convert the reader to a ascii stream // TODO ascii stream: convert the reader to a ascii stream
return IOUtils.getInputStream(s); return IOUtils.getInputStream(s);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1179,7 +1180,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1179,7 +1180,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getCharacterStream", columnIndex); debugCodeCall("getCharacterStream", columnIndex);
return get(columnIndex).getReader(); return get(columnIndex).getReader();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1196,7 +1197,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1196,7 +1197,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getCharacterStream", columnName); debugCodeCall("getCharacterStream", columnName);
return get(columnName).getReader(); return get(columnName).getReader();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1208,7 +1209,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1208,7 +1209,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getURL", columnIndex); debugCodeCall("getURL", columnIndex);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1220,7 +1221,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1220,7 +1221,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getURL", columnName); debugCodeCall("getURL", columnName);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1237,7 +1238,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1237,7 +1238,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("updateNull", columnIndex); debugCodeCall("updateNull", columnIndex);
update(columnIndex, ValueNull.INSTANCE); update(columnIndex, ValueNull.INSTANCE);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1252,7 +1253,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1252,7 +1253,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("updateNull", columnName); debugCodeCall("updateNull", columnName);
update(columnName, ValueNull.INSTANCE); update(columnName, ValueNull.INSTANCE);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1270,7 +1271,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1270,7 +1271,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBoolean("+columnIndex+", "+x+");"); debugCode("updateBoolean("+columnIndex+", "+x+");");
} }
update(columnIndex, ValueBoolean.get(x)); update(columnIndex, ValueBoolean.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1288,7 +1289,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1288,7 +1289,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBoolean("+quote(columnName)+", "+x+");"); debugCode("updateBoolean("+quote(columnName)+", "+x+");");
} }
update(columnName, ValueBoolean.get(x)); update(columnName, ValueBoolean.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1306,7 +1307,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1306,7 +1307,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateByte("+columnIndex+", "+x+");"); debugCode("updateByte("+columnIndex+", "+x+");");
} }
update(columnIndex, ValueByte.get(x)); update(columnIndex, ValueByte.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1324,7 +1325,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1324,7 +1325,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateByte("+columnName+", "+x+");"); debugCode("updateByte("+columnName+", "+x+");");
} }
update(columnName, ValueByte.get(x)); update(columnName, ValueByte.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1342,7 +1343,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1342,7 +1343,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBytes("+columnIndex+", x);"); debugCode("updateBytes("+columnIndex+", x);");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1360,7 +1361,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1360,7 +1361,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBytes("+quote(columnName)+", x);"); debugCode("updateBytes("+quote(columnName)+", x);");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueBytes.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1378,7 +1379,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1378,7 +1379,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateShort("+columnIndex+", (short) "+x+");"); debugCode("updateShort("+columnIndex+", (short) "+x+");");
} }
update(columnIndex, ValueShort.get(x)); update(columnIndex, ValueShort.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1396,7 +1397,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1396,7 +1397,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateShort("+quote(columnName)+", (short) "+x+");"); debugCode("updateShort("+quote(columnName)+", (short) "+x+");");
} }
update(columnName, ValueShort.get(x)); update(columnName, ValueShort.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1414,7 +1415,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1414,7 +1415,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateInt("+columnIndex+", "+x+");"); debugCode("updateInt("+columnIndex+", "+x+");");
} }
update(columnIndex, ValueInt.get(x)); update(columnIndex, ValueInt.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1432,7 +1433,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1432,7 +1433,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateInt("+quote(columnName)+", "+x+");"); debugCode("updateInt("+quote(columnName)+", "+x+");");
} }
update(columnName, ValueInt.get(x)); update(columnName, ValueInt.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1450,7 +1451,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1450,7 +1451,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateLong("+columnIndex+", "+x+"L);"); debugCode("updateLong("+columnIndex+", "+x+"L);");
} }
update(columnIndex, ValueLong.get(x)); update(columnIndex, ValueLong.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1468,7 +1469,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1468,7 +1469,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateLong("+quote(columnName)+", "+x+"L);"); debugCode("updateLong("+quote(columnName)+", "+x+"L);");
} }
update(columnName, ValueLong.get(x)); update(columnName, ValueLong.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1486,7 +1487,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1486,7 +1487,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateFloat("+columnIndex+", "+x+"f);"); debugCode("updateFloat("+columnIndex+", "+x+"f);");
} }
update(columnIndex, ValueFloat.get(x)); update(columnIndex, ValueFloat.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1504,7 +1505,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1504,7 +1505,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateFloat("+quote(columnName)+", "+x+"f);"); debugCode("updateFloat("+quote(columnName)+", "+x+"f);");
} }
update(columnName, ValueFloat.get(x)); update(columnName, ValueFloat.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1522,7 +1523,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1522,7 +1523,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateDouble("+columnIndex+", "+x+"d);"); debugCode("updateDouble("+columnIndex+", "+x+"d);");
} }
update(columnIndex, ValueDouble.get(x)); update(columnIndex, ValueDouble.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1540,7 +1541,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1540,7 +1541,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateDouble("+quote(columnName)+", "+x+"d);"); debugCode("updateDouble("+quote(columnName)+", "+x+"d);");
} }
update(columnName, ValueDouble.get(x)); update(columnName, ValueDouble.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1558,7 +1559,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1558,7 +1559,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBigDecimal("+columnIndex+", " + quoteBigDecimal(x) + ");"); debugCode("updateBigDecimal("+columnIndex+", " + quoteBigDecimal(x) + ");");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1576,7 +1577,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1576,7 +1577,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateBigDecimal("+quote(columnName)+", " + quoteBigDecimal(x) + ");"); debugCode("updateBigDecimal("+quote(columnName)+", " + quoteBigDecimal(x) + ");");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1594,7 +1595,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1594,7 +1595,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateString("+columnIndex+", "+quote(x)+");"); debugCode("updateString("+columnIndex+", "+quote(x)+");");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1612,7 +1613,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1612,7 +1613,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateString("+quote(columnName)+", "+quote(x)+");"); debugCode("updateString("+quote(columnName)+", "+quote(x)+");");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1630,7 +1631,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1630,7 +1631,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateDate("+columnIndex+", x);"); debugCode("updateDate("+columnIndex+", x);");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1648,7 +1649,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1648,7 +1649,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateDate("+quote(columnName)+", x);"); debugCode("updateDate("+quote(columnName)+", x);");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1666,7 +1667,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1666,7 +1667,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateTime("+columnIndex+", x);"); debugCode("updateTime("+columnIndex+", x);");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1684,7 +1685,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1684,7 +1685,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateTime("+quote(columnName)+", x);"); debugCode("updateTime("+quote(columnName)+", x);");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1702,7 +1703,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1702,7 +1703,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateTimestamp("+columnIndex+", x);"); debugCode("updateTimestamp("+columnIndex+", x);");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1720,7 +1721,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1720,7 +1721,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateTimestamp("+quote(columnName)+", x);"); debugCode("updateTimestamp("+quote(columnName)+", x);");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1764,7 +1765,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1764,7 +1765,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(IOUtils.getAsciiReader(x), length); Value v = conn.createClob(IOUtils.getAsciiReader(x), length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1808,7 +1809,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1808,7 +1809,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(IOUtils.getAsciiReader(x), length); Value v = conn.createClob(IOUtils.getAsciiReader(x), length);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1852,7 +1853,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1852,7 +1853,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createBlob(x, length); Value v = conn.createBlob(x, length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1896,7 +1897,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1896,7 +1897,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createBlob(x, length); Value v = conn.createBlob(x, length);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1917,7 +1918,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1917,7 +1918,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -1984,7 +1985,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -1984,7 +1985,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2003,7 +2004,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2003,7 +2004,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateObject("+columnIndex+", x, "+scale+");"); debugCode("updateObject("+columnIndex+", x, "+scale+");");
} }
update(columnIndex, DataType.convertToValue(session, x, Value.UNKNOWN)); update(columnIndex, DataType.convertToValue(session, x, Value.UNKNOWN));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2022,7 +2023,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2022,7 +2023,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateObject("+quote(columnName)+", x, "+scale+");"); debugCode("updateObject("+quote(columnName)+", x, "+scale+");");
} }
update(columnName, DataType.convertToValue(session, x, Value.UNKNOWN)); update(columnName, DataType.convertToValue(session, x, Value.UNKNOWN));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2040,7 +2041,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2040,7 +2041,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateObject("+columnIndex+", x);"); debugCode("updateObject("+columnIndex+", x);");
} }
update(columnIndex, DataType.convertToValue(session, x, Value.UNKNOWN)); update(columnIndex, DataType.convertToValue(session, x, Value.UNKNOWN));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2058,7 +2059,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2058,7 +2059,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateObject("+quote(columnName)+", x);"); debugCode("updateObject("+quote(columnName)+", x);");
} }
update(columnName, DataType.convertToValue(session, x, Value.UNKNOWN)); update(columnName, DataType.convertToValue(session, x, Value.UNKNOWN));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2072,7 +2073,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2072,7 +2073,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateRef("+columnIndex+", x);"); debugCode("updateRef("+columnIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2086,7 +2087,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2086,7 +2087,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateRef("+quote(columnName)+", x);"); debugCode("updateRef("+quote(columnName)+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2118,7 +2119,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2118,7 +2119,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createBlob(x, length); Value v = conn.createBlob(x, length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2143,7 +2144,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2143,7 +2144,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
v = conn.createBlob(x.getBinaryStream(), -1); v = conn.createBlob(x.getBinaryStream(), -1);
} }
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2168,7 +2169,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2168,7 +2169,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
v = conn.createBlob(x.getBinaryStream(), -1); v = conn.createBlob(x.getBinaryStream(), -1);
} }
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2200,7 +2201,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2200,7 +2201,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createBlob(x, -1); Value v = conn.createBlob(x, -1);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2225,7 +2226,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2225,7 +2226,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
v = conn.createClob(x.getCharacterStream(), -1); v = conn.createClob(x.getCharacterStream(), -1);
} }
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2257,7 +2258,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2257,7 +2258,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2282,7 +2283,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2282,7 +2283,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
v = conn.createClob(x.getCharacterStream(), -1); v = conn.createClob(x.getCharacterStream(), -1);
} }
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2314,7 +2315,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2314,7 +2315,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2328,7 +2329,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2328,7 +2329,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateArray("+columnIndex+", x);"); debugCode("updateArray("+columnIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2342,7 +2343,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2342,7 +2343,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateArray("+quote(columnName)+", x);"); debugCode("updateArray("+quote(columnName)+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2356,7 +2357,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2356,7 +2357,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getCursorName"); debugCodeCall("getCursorName");
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2376,7 +2377,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2376,7 +2377,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
return 0; return 0;
} }
return rowId + 1; return rowId + 1;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2392,7 +2393,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2392,7 +2393,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
UpdatableRow row = new UpdatableRow(conn, result, session); UpdatableRow row = new UpdatableRow(conn, result, session);
return row.isUpdatable() ? ResultSet.CONCUR_UPDATABLE : ResultSet.CONCUR_READ_ONLY; return row.isUpdatable() ? ResultSet.CONCUR_UPDATABLE : ResultSet.CONCUR_READ_ONLY;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2407,7 +2408,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2407,7 +2408,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getFetchDirection"); debugCodeCall("getFetchDirection");
checkClosed(); checkClosed();
return ResultSet.FETCH_FORWARD; return ResultSet.FETCH_FORWARD;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2422,7 +2423,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2422,7 +2423,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getFetchSize"); debugCodeCall("getFetchSize");
checkClosed(); checkClosed();
return 0; return 0;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2449,7 +2450,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2449,7 +2450,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
} }
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2467,7 +2468,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2467,7 +2468,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("setFetchDirection", direction); debugCodeCall("setFetchDirection", direction);
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2485,7 +2486,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2485,7 +2486,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getType"); debugCodeCall("getType");
checkClosed(); checkClosed();
return stat == null ? ResultSet.TYPE_FORWARD_ONLY : stat.resultSetType; return stat == null ? ResultSet.TYPE_FORWARD_ONLY : stat.resultSetType;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2502,7 +2503,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2502,7 +2503,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("isBeforeFirst"); debugCodeCall("isBeforeFirst");
checkClosed(); checkClosed();
return result.getRowId() < 0; return result.getRowId() < 0;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2521,7 +2522,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2521,7 +2522,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
int row = result.getRowId(); int row = result.getRowId();
int count = result.getRowCount(); int count = result.getRowCount();
return row >= count || count == 0; return row >= count || count == 0;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2539,7 +2540,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2539,7 +2540,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
int row = result.getRowId(); int row = result.getRowId();
return row == 0 && row < result.getRowCount(); return row == 0 && row < result.getRowCount();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2557,7 +2558,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2557,7 +2558,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
int row = result.getRowId(); int row = result.getRowId();
return row >= 0 && row == result.getRowCount() - 1; return row >= 0 && row == result.getRowCount() - 1;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2575,7 +2576,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2575,7 +2576,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
if (result.getRowId() >= 0) { if (result.getRowId() >= 0) {
resetResult(); resetResult();
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2592,7 +2593,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2592,7 +2593,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
while (nextRow()) { while (nextRow()) {
// nothing // nothing
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2613,7 +2614,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2613,7 +2614,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
resetResult(); resetResult();
return nextRow(); return nextRow();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2629,7 +2630,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2629,7 +2630,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("last"); debugCodeCall("last");
checkClosed(); checkClosed();
return absolute(-1); return absolute(-1);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2662,7 +2663,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2662,7 +2663,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
int row = result.getRowId(); int row = result.getRowId();
return row >= 0 && row < result.getRowCount(); return row >= 0 && row < result.getRowCount();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2688,7 +2689,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2688,7 +2689,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
row = result.getRowCount() + 1; row = result.getRowCount() + 1;
} }
return absolute(row); return absolute(row);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2705,7 +2706,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2705,7 +2706,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("previous"); debugCodeCall("previous");
checkClosed(); checkClosed();
return relative(-1); return relative(-1);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2720,7 +2721,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2720,7 +2721,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("moveToInsertRow"); debugCodeCall("moveToInsertRow");
checkClosed(); checkClosed();
insertRow = new Value[columnCount]; insertRow = new Value[columnCount];
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2735,7 +2736,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2735,7 +2736,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("moveToCurrentRow"); debugCodeCall("moveToCurrentRow");
checkClosed(); checkClosed();
insertRow = null; insertRow = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2749,7 +2750,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2749,7 +2750,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("rowUpdated"); debugCodeCall("rowUpdated");
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2763,7 +2764,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2763,7 +2764,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("rowInserted"); debugCodeCall("rowInserted");
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2777,7 +2778,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2777,7 +2778,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("rowDeleted"); debugCodeCall("rowDeleted");
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2796,7 +2797,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2796,7 +2797,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
getUpdatableRow().insertRow(insertRow); getUpdatableRow().insertRow(insertRow);
insertRow = null; insertRow = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2821,7 +2822,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2821,7 +2822,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
row.refreshRow(result.currentRow()); row.refreshRow(result.currentRow());
updateRow = null; updateRow = null;
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2842,7 +2843,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2842,7 +2843,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkOnValidRow(); checkOnValidRow();
getUpdatableRow().deleteRow(result.currentRow()); getUpdatableRow().deleteRow(result.currentRow());
updateRow = null; updateRow = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2864,7 +2865,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2864,7 +2865,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkOnValidRow(); checkOnValidRow();
getUpdatableRow().refreshRow(result.currentRow()); getUpdatableRow().refreshRow(result.currentRow());
updateRow = null; updateRow = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -2883,7 +2884,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -2883,7 +2884,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw Message.getSQLException(ErrorCode.NO_DATA_AVAILABLE); throw Message.getSQLException(ErrorCode.NO_DATA_AVAILABLE);
} }
updateRow = null; updateRow = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3002,13 +3003,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3002,13 +3003,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
} }
} }
/**
* INTERNAL
*/
public int getTraceId() {
return super.getTraceId();
}
private boolean nextRow() throws SQLException { private boolean nextRow() throws SQLException {
boolean next = result.next(); boolean next = result.next();
if (!next && !scrollable) { if (!next && !scrollable) {
...@@ -3081,7 +3075,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3081,7 +3075,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeCall("getHoldability"); debugCodeCall("getHoldability");
checkClosed(); checkClosed();
return conn.getHoldability(); return conn.getHoldability();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3095,7 +3089,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3095,7 +3089,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("isClosed"); debugCodeCall("isClosed");
return result == null; return result == null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3113,7 +3107,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3113,7 +3107,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNString("+columnIndex+", "+quote(x)+");"); debugCode("updateNString("+columnIndex+", "+quote(x)+");");
} }
update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x)); update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3131,7 +3125,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3131,7 +3125,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNString("+quote(columnName)+", "+quote(x)+");"); debugCode("updateNString("+quote(columnName)+", "+quote(x)+");");
} }
update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x)); update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x));
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3146,7 +3140,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3146,7 +3140,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+columnIndex+", x);"); debugCode("updateNClob("+columnIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3162,7 +3156,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3162,7 +3156,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+columnIndex+", x);"); debugCode("updateNClob("+columnIndex+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3179,7 +3173,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3179,7 +3173,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+columnIndex+", x, " + length + "L);"); debugCode("updateNClob("+columnIndex+", x, " + length + "L);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3196,7 +3190,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3196,7 +3190,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+quote(columnName)+", x);"); debugCode("updateNClob("+quote(columnName)+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3213,7 +3207,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3213,7 +3207,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+quote(columnName)+", x, " + length+"L);"); debugCode("updateNClob("+quote(columnName)+", x, " + length+"L);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3229,7 +3223,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3229,7 +3223,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCode("updateNClob("+quote(columnName)+", x);"); debugCode("updateNClob("+quote(columnName)+", x);");
} }
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3250,7 +3244,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3250,7 +3244,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("NClob", TraceObject.CLOB, id, "getNClob(" + columnIndex + ")"); debugCodeAssign("NClob", TraceObject.CLOB, id, "getNClob(" + columnIndex + ")");
Value v = get(columnIndex); Value v = get(columnIndex);
return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3270,7 +3264,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3270,7 +3264,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
debugCodeAssign("NClob", TraceObject.CLOB, id, "getNClob(" + columnName + ")"); debugCodeAssign("NClob", TraceObject.CLOB, id, "getNClob(" + columnName + ")");
Value v = get(columnName); Value v = get(columnName);
return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id); return v == ValueNull.INSTANCE ? null : new JdbcClob(session, conn, v, id);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3326,7 +3320,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3326,7 +3320,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getNString", columnIndex); debugCodeCall("getNString", columnIndex);
return get(columnIndex).getString(); return get(columnIndex).getString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3343,7 +3337,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3343,7 +3337,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getNString", columnName); debugCodeCall("getNString", columnName);
return get(columnName).getString(); return get(columnName).getString();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3360,7 +3354,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3360,7 +3354,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getNCharacterStream", columnIndex); debugCodeCall("getNCharacterStream", columnIndex);
return get(columnIndex).getReader(); return get(columnIndex).getReader();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3377,7 +3371,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3377,7 +3371,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
try { try {
debugCodeCall("getNCharacterStream", columnName); debugCodeCall("getNCharacterStream", columnName);
return get(columnName).getReader(); return get(columnName).getReader();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3409,7 +3403,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3409,7 +3403,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnIndex, v); update(columnIndex, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -3441,7 +3435,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3441,7 +3435,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
checkClosed(); checkClosed();
Value v = conn.createClob(x, length); Value v = conn.createClob(x, length);
update(columnName, v); update(columnName, v);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -27,7 +27,8 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -27,7 +27,8 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
private final ResultInterface result; private final ResultInterface result;
private final int columnCount; private final int columnCount;
JdbcResultSetMetaData(JdbcResultSet rs, JdbcPreparedStatement prep, ResultInterface result, String catalog, Trace trace, int id) { JdbcResultSetMetaData(JdbcResultSet rs, JdbcPreparedStatement prep, ResultInterface result,
String catalog, Trace trace, int id) {
setTrace(trace, TraceObject.RESULT_SET_META_DATA, id); setTrace(trace, TraceObject.RESULT_SET_META_DATA, id);
this.catalog = catalog; this.catalog = catalog;
this.rs = rs; this.rs = rs;
...@@ -47,7 +48,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -47,7 +48,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getColumnCount"); debugCodeCall("getColumnCount");
checkClosed(); checkClosed();
return columnCount; return columnCount;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -64,7 +65,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -64,7 +65,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getColumnLabel", column); debugCodeCall("getColumnLabel", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getAlias(--column); return result.getAlias(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -81,7 +82,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -81,7 +82,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getColumnName", column); debugCodeCall("getColumnName", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getColumnName(--column); return result.getColumnName(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -99,7 +100,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -99,7 +100,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
checkColumnIndex(column); checkColumnIndex(column);
int type = result.getColumnType(--column); int type = result.getColumnType(--column);
return DataType.convertTypeToSQLType(type); return DataType.convertTypeToSQLType(type);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -117,7 +118,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -117,7 +118,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
checkColumnIndex(column); checkColumnIndex(column);
int type = result.getColumnType(--column); int type = result.getColumnType(--column);
return DataType.getDataType(type).name; return DataType.getDataType(type).name;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -134,7 +135,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -134,7 +135,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getSchemaName", column); debugCodeCall("getSchemaName", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getSchemaName(--column); return result.getSchemaName(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -151,7 +152,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -151,7 +152,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getTableName", column); debugCodeCall("getTableName", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getTableName(--column); return result.getTableName(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -168,7 +169,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -168,7 +169,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getCatalogName", column); debugCodeCall("getCatalogName", column);
checkColumnIndex(column); checkColumnIndex(column);
return catalog; return catalog;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -186,7 +187,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -186,7 +187,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isAutoIncrement", column); debugCodeCall("isAutoIncrement", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.isAutoIncrement(--column); return result.isAutoIncrement(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -204,7 +205,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -204,7 +205,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isCaseSensitive", column); debugCodeCall("isCaseSensitive", column);
checkColumnIndex(column); checkColumnIndex(column);
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -222,7 +223,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -222,7 +223,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isSearchable", column); debugCodeCall("isSearchable", column);
checkColumnIndex(column); checkColumnIndex(column);
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -240,7 +241,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -240,7 +241,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isCurrency", column); debugCodeCall("isCurrency", column);
checkColumnIndex(column); checkColumnIndex(column);
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -261,7 +262,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -261,7 +262,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isNullable", column); debugCodeCall("isNullable", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getNullable(--column); return result.getNullable(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -279,7 +280,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -279,7 +280,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isSigned", column); debugCodeCall("isSigned", column);
checkColumnIndex(column); checkColumnIndex(column);
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -297,7 +298,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -297,7 +298,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isReadOnly", column); debugCodeCall("isReadOnly", column);
checkColumnIndex(column); checkColumnIndex(column);
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -315,7 +316,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -315,7 +316,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isWritable", column); debugCodeCall("isWritable", column);
checkColumnIndex(column); checkColumnIndex(column);
return true; return true;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -333,7 +334,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -333,7 +334,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("isDefinitelyWritable", column); debugCodeCall("isDefinitelyWritable", column);
checkColumnIndex(column); checkColumnIndex(column);
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -352,7 +353,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -352,7 +353,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
checkColumnIndex(column); checkColumnIndex(column);
int type = result.getColumnType(--column); int type = result.getColumnType(--column);
return DataType.getTypeClassName(type); return DataType.getTypeClassName(type);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -371,7 +372,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -371,7 +372,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
checkColumnIndex(column); checkColumnIndex(column);
long prec = result.getColumnPrecision(--column); long prec = result.getColumnPrecision(--column);
return MathUtils.convertLongToInt(prec); return MathUtils.convertLongToInt(prec);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -389,7 +390,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -389,7 +390,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getScale", column); debugCodeCall("getScale", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getColumnScale(--column); return result.getColumnScale(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -406,7 +407,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -406,7 +407,7 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
debugCodeCall("getColumnDisplaySize", column); debugCodeCall("getColumnDisplaySize", column);
checkColumnIndex(column); checkColumnIndex(column);
return result.getDisplaySize(--column); return result.getDisplaySize(--column);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -75,7 +75,7 @@ implements Savepoint ...@@ -75,7 +75,7 @@ implements Savepoint
throw Message.getSQLException(ErrorCode.SAVEPOINT_IS_NAMED); throw Message.getSQLException(ErrorCode.SAVEPOINT_IS_NAMED);
} }
return savepointId; return savepointId;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -92,7 +92,7 @@ implements Savepoint ...@@ -92,7 +92,7 @@ implements Savepoint
throw Message.getSQLException(ErrorCode.SAVEPOINT_IS_UNNAMED); throw Message.getSQLException(ErrorCode.SAVEPOINT_IS_UNNAMED);
} }
return name; return name;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -40,10 +40,10 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -40,10 +40,10 @@ public class JdbcStatement extends TraceObject implements Statement {
private ObjectArray batchCommands; private ObjectArray batchCommands;
private boolean escapeProcessing = true; private boolean escapeProcessing = true;
JdbcStatement(SessionInterface session, JdbcConnection conn, int resultSetType, int id, boolean closeWithResultSet) { JdbcStatement(JdbcConnection conn, int resultSetType, int id, boolean closeWithResultSet) {
setTrace(session.getTrace(), TraceObject.STATEMENT, id);
this.session = session;
this.conn = conn; this.conn = conn;
this.session = conn.getSession();
setTrace(session.getTrace(), TraceObject.STATEMENT, id);
this.resultSetType = resultSetType; this.resultSetType = resultSetType;
this.closedByResultSet = closeWithResultSet; this.closedByResultSet = closeWithResultSet;
} }
...@@ -77,10 +77,10 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -77,10 +77,10 @@ public class JdbcStatement extends TraceObject implements Statement {
setExecutingStatement(null); setExecutingStatement(null);
} }
command.close(); command.close();
resultSet = new JdbcResultSet(session, conn, this, result, id, closedByResultSet, scrollable); resultSet = new JdbcResultSet(conn, this, result, id, closedByResultSet, scrollable);
} }
return resultSet; return resultSet;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -121,7 +121,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -121,7 +121,7 @@ public class JdbcStatement extends TraceObject implements Statement {
} }
command.close(); command.close();
return updateCount; return updateCount;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -157,7 +157,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -157,7 +157,7 @@ public class JdbcStatement extends TraceObject implements Statement {
returnsResultSet = true; returnsResultSet = true;
boolean scrollable = resultSetType != ResultSet.TYPE_FORWARD_ONLY; boolean scrollable = resultSetType != ResultSet.TYPE_FORWARD_ONLY;
ResultInterface result = command.executeQuery(maxRows, scrollable); ResultInterface result = command.executeQuery(maxRows, scrollable);
resultSet = new JdbcResultSet(session, conn, this, result, id, closedByResultSet, scrollable); resultSet = new JdbcResultSet(conn, this, result, id, closedByResultSet, scrollable);
} else { } else {
returnsResultSet = false; returnsResultSet = false;
updateCount = command.executeUpdate(); updateCount = command.executeUpdate();
...@@ -168,7 +168,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -168,7 +168,7 @@ public class JdbcStatement extends TraceObject implements Statement {
} }
command.close(); command.close();
return returnsResultSet; return returnsResultSet;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -188,7 +188,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -188,7 +188,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getResultSet"); debugCodeCall("getResultSet");
} }
return resultSet; return resultSet;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -206,7 +206,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -206,7 +206,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getUpdateCount"); debugCodeCall("getUpdateCount");
checkClosed(); checkClosed();
return updateCount; return updateCount;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -223,7 +223,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -223,7 +223,7 @@ public class JdbcStatement extends TraceObject implements Statement {
if (conn != null) { if (conn != null) {
conn = null; conn = null;
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -238,7 +238,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -238,7 +238,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getConnection"); debugCodeCall("getConnection");
checkClosed(); checkClosed();
return conn; return conn;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -254,7 +254,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -254,7 +254,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getWarnings"); debugCodeCall("getWarnings");
checkClosed(); checkClosed();
return null; return null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -267,7 +267,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -267,7 +267,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("clearWarnings"); debugCodeCall("clearWarnings");
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -287,7 +287,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -287,7 +287,7 @@ public class JdbcStatement extends TraceObject implements Statement {
checkClosed(); checkClosed();
closeOld(); closeOld();
return false; return false;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -302,7 +302,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -302,7 +302,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("setCursorName", name); debugCodeCall("setCursorName", name);
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -318,7 +318,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -318,7 +318,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("setFetchDirection", direction); debugCodeCall("setFetchDirection", direction);
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -334,7 +334,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -334,7 +334,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getFetchDirection"); debugCodeCall("getFetchDirection");
checkClosed(); checkClosed();
return ResultSet.FETCH_FORWARD; return ResultSet.FETCH_FORWARD;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -350,7 +350,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -350,7 +350,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getMaxRows"); debugCodeCall("getMaxRows");
checkClosed(); checkClosed();
return maxRows; return maxRows;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -369,7 +369,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -369,7 +369,7 @@ public class JdbcStatement extends TraceObject implements Statement {
throw Message.getInvalidValueException(""+maxRows, "maxRows"); throw Message.getInvalidValueException(""+maxRows, "maxRows");
} }
this.maxRows = maxRows; this.maxRows = maxRows;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -396,7 +396,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -396,7 +396,7 @@ public class JdbcStatement extends TraceObject implements Statement {
rows = SysProperties.SERVER_RESULT_SET_FETCH_SIZE; rows = SysProperties.SERVER_RESULT_SET_FETCH_SIZE;
} }
fetchSize = rows; fetchSize = rows;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -412,7 +412,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -412,7 +412,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getFetchSize"); debugCodeCall("getFetchSize");
checkClosed(); checkClosed();
return fetchSize; return fetchSize;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -428,7 +428,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -428,7 +428,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getResultSetConcurrency"); debugCodeCall("getResultSetConcurrency");
checkClosed(); checkClosed();
return ResultSet.CONCUR_UPDATABLE; return ResultSet.CONCUR_UPDATABLE;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -444,7 +444,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -444,7 +444,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getResultSetType"); debugCodeCall("getResultSetType");
checkClosed(); checkClosed();
return resultSetType; return resultSetType;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -460,7 +460,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -460,7 +460,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getMaxFieldSize"); debugCodeCall("getMaxFieldSize");
checkClosed(); checkClosed();
return 0; return 0;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -476,7 +476,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -476,7 +476,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("setMaxFieldSize", max); debugCodeCall("setMaxFieldSize", max);
checkClosed(); checkClosed();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -495,7 +495,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -495,7 +495,7 @@ public class JdbcStatement extends TraceObject implements Statement {
} }
checkClosed(); checkClosed();
escapeProcessing = enable; escapeProcessing = enable;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -520,7 +520,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -520,7 +520,7 @@ public class JdbcStatement extends TraceObject implements Statement {
} finally { } finally {
setExecutingStatement(null); setExecutingStatement(null);
} }
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -538,7 +538,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -538,7 +538,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getQueryTimeout"); debugCodeCall("getQueryTimeout");
checkClosed(); checkClosed();
return conn.getQueryTimeout(); return conn.getQueryTimeout();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -562,7 +562,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -562,7 +562,7 @@ public class JdbcStatement extends TraceObject implements Statement {
throw Message.getInvalidValueException("" + seconds, "seconds"); throw Message.getInvalidValueException("" + seconds, "seconds");
} }
conn.setQueryTimeout(seconds); conn.setQueryTimeout(seconds);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -581,7 +581,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -581,7 +581,7 @@ public class JdbcStatement extends TraceObject implements Statement {
batchCommands = new ObjectArray(); batchCommands = new ObjectArray();
} }
batchCommands.add(sql); batchCommands.add(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -594,7 +594,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -594,7 +594,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("clearBatch"); debugCodeCall("clearBatch");
checkClosed(); checkClosed();
batchCommands = null; batchCommands = null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -631,7 +631,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -631,7 +631,7 @@ public class JdbcStatement extends TraceObject implements Statement {
throw new BatchUpdateException(result); throw new BatchUpdateException(result);
} }
return result; return result;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -651,9 +651,9 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -651,9 +651,9 @@ public class JdbcStatement extends TraceObject implements Statement {
} }
checkClosed(); checkClosed();
ResultInterface result = conn.getGeneratedKeys(); ResultInterface result = conn.getGeneratedKeys();
ResultSet rs = new JdbcResultSet(session, conn, this, result, id, false, true); ResultSet rs = new JdbcResultSet(conn, this, result, id, false, true);
return rs; return rs;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -665,7 +665,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -665,7 +665,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("getMoreResults"); debugCodeCall("getMoreResults");
throw Message.getUnsupportedException(); throw Message.getUnsupportedException();
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -687,7 +687,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -687,7 +687,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");"); debugCode("executeUpdate("+quote(sql)+", "+autoGeneratedKeys+");");
} }
return executeUpdate(sql); return executeUpdate(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -709,7 +709,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -709,7 +709,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("executeUpdate("+quote(sql)+", "+quoteIntArray(columnIndexes)+");"); debugCode("executeUpdate("+quote(sql)+", "+quoteIntArray(columnIndexes)+");");
} }
return executeUpdate(sql); return executeUpdate(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -731,7 +731,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -731,7 +731,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("executeUpdate("+quote(sql)+", "+quoteArray(columnNames)+");"); debugCode("executeUpdate("+quote(sql)+", "+quoteArray(columnNames)+");");
} }
return executeUpdate(sql); return executeUpdate(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -753,7 +753,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -753,7 +753,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("execute("+quote(sql)+", "+autoGeneratedKeys+");"); debugCode("execute("+quote(sql)+", "+autoGeneratedKeys+");");
} }
return execute(sql); return execute(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -775,7 +775,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -775,7 +775,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("execute("+quote(sql)+", "+quoteIntArray(columnIndexes)+");"); debugCode("execute("+quote(sql)+", "+quoteIntArray(columnIndexes)+");");
} }
return execute(sql); return execute(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -797,7 +797,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -797,7 +797,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCode("execute("+quote(sql)+", "+quoteArray(columnNames)+");"); debugCode("execute("+quote(sql)+", "+quoteArray(columnNames)+");");
} }
return execute(sql); return execute(sql);
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -813,7 +813,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -813,7 +813,7 @@ public class JdbcStatement extends TraceObject implements Statement {
debugCodeCall("getResultSetHoldability"); debugCodeCall("getResultSetHoldability");
checkClosed(); checkClosed();
return ResultSet.HOLD_CURSORS_OVER_COMMIT; return ResultSet.HOLD_CURSORS_OVER_COMMIT;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
...@@ -855,7 +855,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -855,7 +855,7 @@ public class JdbcStatement extends TraceObject implements Statement {
try { try {
debugCodeCall("isClosed"); debugCodeCall("isClosed");
return conn == null; return conn == null;
} catch (Throwable e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
......
...@@ -26,9 +26,9 @@ import java.sql.SQLException; ...@@ -26,9 +26,9 @@ import java.sql.SQLException;
import java.util.Stack; import java.util.Stack;
import javax.sql.ConnectionEvent; import javax.sql.ConnectionEvent;
import javax.sql.DataSource;
import javax.sql.ConnectionEventListener; import javax.sql.ConnectionEventListener;
import javax.sql.ConnectionPoolDataSource; import javax.sql.ConnectionPoolDataSource;
import javax.sql.DataSource;
import javax.sql.PooledConnection; import javax.sql.PooledConnection;
/*## Java 1.6 begin ## /*## Java 1.6 begin ##
......
...@@ -59,7 +59,7 @@ implements ObjectFactory ...@@ -59,7 +59,7 @@ implements ObjectFactory
* not JdbcDataSource. * not JdbcDataSource.
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public synchronized Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { public synchronized Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) {
if (trace.isDebugEnabled()) { if (trace.isDebugEnabled()) {
trace.debug("getObjectInstance obj=" + obj + " name=" + name + " nameCtx=" + nameCtx + " environment=" + environment); trace.debug("getObjectInstance obj=" + obj + " name=" + name + " nameCtx=" + nameCtx + " environment=" + environment);
} }
......
...@@ -19,10 +19,10 @@ import javax.sql.XAConnection; ...@@ -19,10 +19,10 @@ import javax.sql.XAConnection;
import javax.transaction.xa.XAException; import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid; import javax.transaction.xa.Xid;
import org.h2.jdbc.JdbcConnection;
import org.h2.util.ByteUtils; import org.h2.util.ByteUtils;
import org.h2.util.JdbcConnectionListener; import org.h2.util.JdbcConnectionListener;
import org.h2.util.JdbcUtils; import org.h2.util.JdbcUtils;
import org.h2.jdbc.JdbcConnection;
//## Java 1.4 end ## //## Java 1.4 end ##
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
...@@ -83,6 +83,8 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -83,6 +83,8 @@ implements XAConnection, XAResource, JdbcConnectionListener
/** /**
* Close the physical connection. * Close the physical connection.
* This method is usually called by the connection pool. * This method is usually called by the connection pool.
*
* @throws SQLException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public void close() throws SQLException { public void close() throws SQLException {
...@@ -102,6 +104,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -102,6 +104,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* pool when there are no more connections in the pool. * pool when there are no more connections in the pool.
* *
* @return the connection * @return the connection
* @throws SQLException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public Connection getConnection() throws SQLException { public Connection getConnection() throws SQLException {
...@@ -217,6 +220,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -217,6 +220,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* @param flag TMSTARTRSCAN, TMENDRSCAN, or TMNOFLAGS. If no other flags are set, * @param flag TMSTARTRSCAN, TMENDRSCAN, or TMNOFLAGS. If no other flags are set,
* TMNOFLAGS must be used. * TMNOFLAGS must be used.
* @return zero or more Xid objects * @return zero or more Xid objects
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public Xid[] recover(int flag) throws XAException { public Xid[] recover(int flag) throws XAException {
...@@ -249,6 +253,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -249,6 +253,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* Prepare a transaction. * Prepare a transaction.
* *
* @param xid the transaction id * @param xid the transaction id
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public int prepare(Xid xid) throws XAException { public int prepare(Xid xid) throws XAException {
...@@ -291,6 +296,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -291,6 +296,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* Roll back a transaction. * Roll back a transaction.
* *
* @param xid the transaction id * @param xid the transaction id
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public void rollback(Xid xid) throws XAException { public void rollback(Xid xid) throws XAException {
...@@ -311,6 +317,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -311,6 +317,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* *
* @param xid the transaction id * @param xid the transaction id
* @param flags TMSUCCESS, TMFAIL, or TMSUSPEND * @param flags TMSUCCESS, TMFAIL, or TMSUSPEND
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public void end(Xid xid, int flags) throws XAException { public void end(Xid xid, int flags) throws XAException {
...@@ -332,6 +339,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -332,6 +339,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* *
* @param xid the transaction id * @param xid the transaction id
* @param flags TMNOFLAGS, TMJOIN, or TMRESUME * @param flags TMNOFLAGS, TMJOIN, or TMRESUME
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public void start(Xid xid, int flags) throws XAException { public void start(Xid xid, int flags) throws XAException {
...@@ -358,6 +366,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -358,6 +366,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
* *
* @param xid the transaction id * @param xid the transaction id
* @param onePhase use a one-phase protocol if true * @param onePhase use a one-phase protocol if true
* @throws XAException
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public void commit(Xid xid, boolean onePhase) throws XAException { public void commit(Xid xid, boolean onePhase) throws XAException {
......
...@@ -44,7 +44,7 @@ implements Xid ...@@ -44,7 +44,7 @@ implements Xid
formatId = Integer.parseInt(tokenizer.nextToken()); formatId = Integer.parseInt(tokenizer.nextToken());
branchQualifier = ByteUtils.convertStringToBytes(tokenizer.nextToken()); branchQualifier = ByteUtils.convertStringToBytes(tokenizer.nextToken());
globalTransactionId = ByteUtils.convertStringToBytes(tokenizer.nextToken()); globalTransactionId = ByteUtils.convertStringToBytes(tokenizer.nextToken());
} catch (Throwable e) { } catch (Exception e) {
throw Message.getSQLException(ErrorCode.WRONG_XID_FORMAT_1, tid); throw Message.getSQLException(ErrorCode.WRONG_XID_FORMAT_1, tid);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论