コード例 #1
0
ファイル: CppSQLite3.cpp プロジェクト: CyberShadow/Ditto
CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,
									TCHAR* szErrMess,
									bool bDeleteMsg/*=true*/) :
									mnErrCode(nErrCode)
{
#ifdef _UNICODE
	swprintf(mpszErrMess, _T("%s[%d]: %s"),
								errorCodeAsString(nErrCode),
								nErrCode,
								szErrMess ? szErrMess : _T(""));
#else
	sprintf(mpszErrMess, "%s[%d]: %s",
								errorCodeAsString(nErrCode),
								nErrCode,
								szErrMess ? szErrMess : "");
#endif

//	if (bDeleteMsg && szErrMess)
//	{
//		sqlite3_free(szErrMess);
//	}
}
コード例 #2
0
ファイル: Sqlite3DB.cpp プロジェクト: a3587556/trochilus
	CSQLite3Exception(const int nErrCode,
		char* szErrMess,
		bool bDeleteMsg=true)
	{
		m_pErrMess = sqlite3_mprintf("%s[%d]: %s",
			errorCodeAsString(nErrCode),
			nErrCode,
			szErrMess ? szErrMess : "");

		if (bDeleteMsg && szErrMess)
		{
			sqlite3_free(szErrMess);
		}
	}
コード例 #3
0
ファイル: CppSQLite3.cpp プロジェクト: jacksonpan/easysqlite
CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,
                                    const char* szErrMess,
                                    bool bDeleteMsg/*=true*/) :
                                    mnErrCode(nErrCode)
{
    mpszErrMess = sqlite3_mprintf("%s[%d]: %s",
                                errorCodeAsString(nErrCode),
                                nErrCode,
                                szErrMess ? szErrMess : "");

    if (bDeleteMsg && szErrMess)
    {
        sqlite3_free((void*)szErrMess);
    }
}
コード例 #4
0
ファイル: CppSQLite3U.cpp プロジェクト: cspark777/PDFManager
CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,
									LPTSTR szErrMess,
									bool bDeleteMsg/*=true*/) :
									mnErrCode(nErrCode)
{
	mpszErrMess=new TCHAR[ szErrMess ? _tcslen(szErrMess)+50 : 50];
	_stprintf(mpszErrMess, _T("%s[%d]: %s"),
								errorCodeAsString(nErrCode),
								nErrCode,
								szErrMess ? szErrMess : _T(""));

	if (bDeleteMsg && szErrMess)
	{
		_sqlite3_free((char*)szErrMess);
	}
}
コード例 #5
0
CppSQLite3Exception::CppSQLite3Exception(const int nErrCode, const CString& errMessage)
    : mnErrCode(nErrCode)
{
    msErrMessage = WizFormatString3("%1[%2]: %3", errorCodeAsString(nErrCode), WizIntToStr(nErrCode), errMessage);
}