FR [ 2115814 ] DBException should store SQL Query String too
This commit is contained in:
parent
f2f6239d0e
commit
f47df08a66
|
@ -28,9 +28,12 @@ import java.sql.SQLException;
|
|||
*
|
||||
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||
*/
|
||||
public class DBException extends AdempiereException {
|
||||
public class DBException extends AdempiereException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String m_sql = null;
|
||||
|
||||
/**
|
||||
* Create a new DBException based on a SQLException
|
||||
* @param e Specicy the Exception cause
|
||||
|
@ -40,6 +43,17 @@ public class DBException extends AdempiereException {
|
|||
super(e);
|
||||
} // DBException
|
||||
|
||||
/**
|
||||
* Create a new DBException based on a SQLException and SQL Query
|
||||
* @param e exception
|
||||
* @param sql sql query
|
||||
*/
|
||||
public DBException(SQLException e, String sql)
|
||||
{
|
||||
super(e);
|
||||
m_sql = sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new DBException
|
||||
* @param msg Message
|
||||
|
@ -49,6 +63,14 @@ public class DBException extends AdempiereException {
|
|||
super(msg);
|
||||
} // DBException
|
||||
|
||||
/**
|
||||
* @return SQL Query or null
|
||||
*/
|
||||
public String getSQL()
|
||||
{
|
||||
return m_sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Wrapped SQLException or null
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue