Skip to content

Commit fd5a288

Browse files
committed
Update SODAUtils.java
1 parent 9566627 commit fd5a288

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/oracle/soda/rdbms/impl/SODAUtils.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,32 @@ static OracleBatchException makeBatchException(SODAMessage msg,
5454
msg.getKey(),
5555
processedCount);
5656
}
57-
5857
static OracleException makeExceptionWithSQLText(Throwable cause,
5958
String sqlText)
59+
{
60+
return makeExceptionWithSQLText(null, cause, sqlText);
61+
}
62+
63+
static OracleException makeExceptionWithSQLText(SODAMessage msg,
64+
Throwable cause,
65+
String sqlText,
66+
Object... params)
6067
{
6168
class OracleSQLException extends OracleException implements SQLTextCarrier
6269
{
6370
String sqlText;
6471

72+
public OracleSQLException(String message,
73+
Throwable cause,
74+
int errorCode,
75+
String sqlText)
76+
{
77+
super(message, cause, errorCode);
78+
this.sqlText = sqlText;
79+
}
80+
6581
public OracleSQLException(Throwable cause, String sqlText)
82+
6683
{
6784
super(cause);
6885
this.sqlText = sqlText;
@@ -74,6 +91,9 @@ public String getSQL()
7491
}
7592
}
7693

94+
if (msg != null)
95+
return new OracleSQLException(msg.get(params), cause, msg.getKey(), sqlText);
96+
7797
return new OracleSQLException(cause, sqlText);
7898
};
7999

0 commit comments

Comments
 (0)