MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / Code

Method Code

src/util/constants.cpp:6–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4public:
5
6 Napi::String Code(Napi::Env env, int code) {
7 auto element = codes.find(code);
8 if (element != codes.end()) return element->second.Value();
9 return StringFromUtf8(env, (std::string("UNKNOWN_SQLITE_ERROR_") + std::to_string(code)).c_str(), -1);
10 }
11
12 explicit CS(Napi::Env env) {
13 SetString(env, database, "database");

Callers 1

ThrowSqliteErrorMethod · 0.80

Calls 1

StringFromUtf8Function · 0.85

Tested by

no test coverage detected