Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
a60ff493
Commit
a60ff493
authored
Mar 17, 2011
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fail hard on logic errors
parent
f4e8adac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
macros.h
src/macros.h
+2
-0
statement.cc
src/statement.cc
+2
-0
No files found.
src/macros.h
View file @
a60ff493
...
@@ -141,6 +141,8 @@ const char* sqlite_code_string(int code);
...
@@ -141,6 +141,8 @@ const char* sqlite_code_string(int code);
Statement* stmt = baton->stmt;
Statement* stmt = baton->stmt;
#define STATEMENT_END() \
#define STATEMENT_END() \
assert(stmt->locked); \
assert(stmt->db->pending) \
stmt->locked = false; \
stmt->locked = false; \
stmt->db->pending--; \
stmt->db->pending--; \
stmt->Process(); \
stmt->Process(); \
...
...
src/statement.cc
View file @
a60ff493
...
@@ -64,6 +64,8 @@ void Statement::Schedule(EIO_Callback callback, Baton* baton) {
...
@@ -64,6 +64,8 @@ void Statement::Schedule(EIO_Callback callback, Baton* baton) {
template
<
class
T
>
void
Statement
::
Error
(
T
*
baton
)
{
template
<
class
T
>
void
Statement
::
Error
(
T
*
baton
)
{
Statement
*
stmt
=
baton
->
stmt
;
Statement
*
stmt
=
baton
->
stmt
;
// Fail hard on logic errors.
assert
(
stmt
->
status
!=
0
);
EXCEPTION
(
String
::
New
(
stmt
->
message
.
c_str
()),
stmt
->
status
,
exception
);
EXCEPTION
(
String
::
New
(
stmt
->
message
.
c_str
()),
stmt
->
status
,
exception
);
if
(
!
baton
->
callback
.
IsEmpty
()
&&
baton
->
callback
->
IsFunction
())
{
if
(
!
baton
->
callback
.
IsEmpty
()
&&
baton
->
callback
->
IsFunction
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment