System.Data.SQLite
Check-in [b5a342952a]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Always attempt to log virtual table errors.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | virtualTables
Files: files | file ages | folders
SHA1: b5a342952a36268362475e66c749371c8b88c849
User & Date: mistachkin 2013-06-21 06:33:13
Context
2013-06-21
07:06
Add LogErrors and LogExceptions properties to the SQLiteModuleBase class. Allow the ISQLiteNativeModule implementation of the SQLiteModuleBase class to be overridden; however, remove it as a formal interface. check-in: deb17e28f2 user: mistachkin tags: virtualTables
06:33
Always attempt to log virtual table errors. check-in: b5a342952a user: mistachkin tags: virtualTables
06:27
Fix disposal semantics for classes derived from the SQLiteModuleBase class. Use the String.Format method consistently. Enable virtual table related native memory allocation tracking on the .NET Compact Framework. check-in: f9041807b3 user: mistachkin tags: virtualTables
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteModuleBase.cs.

  2303   2303   
  2304   2304           #region Error Handling Helper Methods
  2305   2305           protected virtual bool SetTableError(
  2306   2306               IntPtr pVtab,
  2307   2307               string error
  2308   2308               )
  2309   2309           {
         2310  +            try
         2311  +            {
         2312  +                SQLiteLog.LogMessage(SQLiteErrorCode.Error,
         2313  +                    String.Format(CultureInfo.CurrentCulture,
         2314  +                    "Virtual table error: {0}", error)); /* throw */
         2315  +            }
         2316  +            catch
         2317  +            {
         2318  +                // do nothing.
         2319  +            }
         2320  +
  2310   2321               if (pVtab == IntPtr.Zero)
  2311   2322                   return false;
  2312   2323   
  2313   2324               int offset = IntPtr.Size + sizeof(int);
  2314   2325               IntPtr pError = SQLiteMarshal.ReadIntPtr(pVtab, offset);
  2315   2326   
  2316   2327               if (pError != IntPtr.Zero)