提交 e2ad0b0f 编写于 作者: S Sam Harwell

Avoid using SQLitePCL.raw outside NativeMethods

上级 03aa9f11
......@@ -86,6 +86,11 @@ public static string sqlite3_errmsg(SafeSqliteHandle db)
return raw.sqlite3_errmsg(db.DangerousGetHandle());
}
public static string sqlite3_errstr(int rc)
{
return raw.sqlite3_errstr(rc);
}
public static int sqlite3_extended_errcode(SafeSqliteHandle db)
{
using var _ = db.Lease();
......
......@@ -8,7 +8,6 @@
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.SQLite.Interop;
using Roslyn.Utilities;
using SQLitePCL;
namespace Microsoft.CodeAnalysis.SQLite.v1.Interop
{
......@@ -298,7 +297,7 @@ public static void Throw(SafeSqliteHandle handle, Result result)
{
throw new SqlException(result,
NativeMethods.sqlite3_errmsg(handle) + "\r\n" +
raw.sqlite3_errstr(NativeMethods.sqlite3_extended_errcode(handle)));
NativeMethods.sqlite3_errstr(NativeMethods.sqlite3_extended_errcode(handle)));
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册