Skip to content

Commit 384d14a

Browse files
committed
chore(fmt)
1 parent 45521a5 commit 384d14a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/shims/node_errors.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ inline void THROW_ERR_SQLITE_ERROR(Napi::Env env,
3636
const char *message = nullptr) {
3737
// Check for both null and empty string - on Windows (MSVC),
3838
// std::exception::what() can sometimes return an empty string
39-
const char *msg =
40-
(message && message[0] != '\0') ? message : "SQLite error";
39+
const char *msg = (message && message[0] != '\0') ? message : "SQLite error";
4140
Napi::Error::New(env, msg).ThrowAsJavaScriptException();
4241
}
4342

src/sqlite_impl.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,11 @@ Napi::Value DatabaseSync::Prepare(const Napi::CallbackInfo &info) {
586586
// empty string, causing message loss.
587587
//
588588
// 2. By storing the message in the DatabaseSync instance, we can retrieve
589-
// it here and throw a proper JavaScript exception with the original text.
589+
// it here and throw a proper JavaScript exception with the original
590+
// text.
590591
//
591-
// See also: StatementSync::InitStatement for the other half of this pattern.
592+
// See also: StatementSync::InitStatement for the other half of this
593+
// pattern.
592594
if (HasDeferredAuthorizerException()) {
593595
std::string deferred_msg = GetDeferredAuthorizerException();
594596
ClearDeferredAuthorizerException();
@@ -1495,7 +1497,8 @@ void StatementSync::InitStatement(DatabaseSync *database,
14951497
// empty string, causing message loss.
14961498
//
14971499
// 2. By storing the message in the DatabaseSync instance, the caller can
1498-
// retrieve it and throw a proper JavaScript exception with the original text.
1500+
// retrieve it and throw a proper JavaScript exception with the original
1501+
// text.
14991502
//
15001503
// 3. This matches Node.js's behavior where JavaScript exceptions from
15011504
// authorizer callbacks propagate correctly to the caller.

0 commit comments

Comments
 (0)