00001 using System; 00002 using System.Data; 00003 00004 using SQLiteCSLib.Inner; 00005 00006 namespace SQLiteCSLib 00007 { 00011 public class SQLiteException : DataException 00012 { 00016 protected ResultEnum m_errcode = ResultEnum.ERROR; 00017 00021 protected int m_extendederrcode = -1; 00022 00027 public SQLiteException( SQLiteConnection connect ) : base( (connect != null ) ? connect.OSQLiteDB.getLastErrMsg():"Fail!!" ) 00028 { 00029 if( connect != null ) 00030 { 00031 m_extendederrcode = connect.OSQLiteDB.getExtendedErrcode(); 00032 m_errcode = (ResultEnum)connect.OSQLiteDB.getLastErr(); 00033 } 00034 } 00035 00040 public SQLiteException( OSQLiteStmtWrap stmt ) : base( (stmt != null ) ? stmt.DbWrap().getLastErrMsg():"Fail!!" ) 00041 { 00042 if( stmt != null ) 00043 { 00044 m_extendederrcode = stmt.DbWrap().getExtendedErrcode(); 00045 m_errcode = (ResultEnum)stmt.DbWrap().getLastErr(); 00046 } 00047 } 00048 } 00049 }