MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / save_err_msg

Function save_err_msg

src/database/cppsqlite3.cpp:1337–1347  ·  view source on GitHub ↗

** Allocate space and save off current error string. */

Source from the content-addressed store, hash-verified

1335** Allocate space and save off current error string.
1336*/
1337static char *save_err_msg(
1338 sqlite3 *db /* Database to query */
1339 )
1340{
1341 int nErrMsg = 1+strlen30(sqlite3_errmsg(db));
1342 char *zErrMsg = (char*)sqlite3_malloc(nErrMsg);
1343 if( zErrMsg ){
1344 memcpy(zErrMsg, sqlite3_errmsg(db), nErrMsg);
1345 }
1346 return zErrMsg;
1347}
1348/*
1349** Execute a statement or set of statements. Print
1350** any result rows/columns depending on the current mode

Callers 1

shell_execFunction · 0.85

Calls 1

strlen30Function · 0.85

Tested by

no test coverage detected