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

Method Code

src/util/constants.cpp:4–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2public:
3
4 v8::Local<v8::String> Code(v8::Isolate* isolate, int code) {
5 auto element = codes.find(code);
6 if (element != codes.end()) return element->second.Get(isolate);
7 return StringFromUtf8(isolate, (std::string("UNKNOWN_SQLITE_ERROR_") + std::to_string(code)).c_str(), -1);
8 }
9
10 explicit CS(v8::Isolate* isolate) {
11 SetString(isolate, database, "database");

Callers 1

ThrowSqliteErrorMethod · 0.80

Calls 1

StringFromUtf8Function · 0.85

Tested by

no test coverage detected