From e84179831413cd0feee6e1ba0ae80e9826754a5a Mon Sep 17 00:00:00 2001 From: muxator Date: Fri, 15 Feb 2019 22:52:53 +0100 Subject: [PATCH] prepare to async: typos in error messages This change extracts the grammar correction performed on the async branch, anticipating them in a single commit. It cannot be folded with the previous one, as it is not purely cosmetic. --- src/node/db/API.js | 14 +++++++------- src/node/db/GroupManager.js | 2 +- src/node/db/SessionManager.js | 2 +- src/node/handler/ImportHandler.js | 2 +- src/node/handler/PadMessageHandler.js | 2 +- src/node/handler/SocketIORouter.js | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/node/db/API.js b/src/node/db/API.js index edae1ba32..a2c0d60b7 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -204,7 +204,7 @@ exports.getText = function(padID, rev, callback) // ensure this is not a negative number if (rev !== undefined && rev < 0) { - callback(new customError("rev is a negativ number", "apierror")); + callback(new customError("rev is a negative number", "apierror")); return; } @@ -257,7 +257,7 @@ exports.setText = function(padID, text, callback) { // text is required if (typeof text != "string") { - callback(new customError("text is no string", "apierror")); + callback(new customError("text is not a string", "apierror")); return; } @@ -286,7 +286,7 @@ exports.appendText = function(padID, text, callback) { // text is required if (typeof text != "string") { - callback(new customError("text is no string", "apierror")); + callback(new customError("text is not a string", "apierror")); return; } @@ -376,7 +376,7 @@ exports.setHTML = function(padID, html, callback) { // html is required if (typeof html != "string") { - callback(new customError("html is no string", "apierror")); + callback(new customError("html is not a string", "apierror")); return; } @@ -472,7 +472,7 @@ exports.appendChatMessage = function(padID, text, authorID, time, callback) { // text is required if (typeof text != "string") { - callback(new customError("text is no string", "apierror")); + callback(new customError("text is not a string", "apierror")); return; } @@ -569,7 +569,7 @@ exports.saveRevision = function(padID, rev, callback) // ensure this is not a negative number if (rev !== undefined && rev < 0) { - callback(new customError("rev is a negativ number", "apierror")); + callback(new customError("rev is a negative number", "apierror")); return; } @@ -694,7 +694,7 @@ exports.restoreRevision = function(padID, rev, callback) // ensure this is not a negative number if (rev !== undefined && rev < 0) { - callback(new customError("rev is a negativ number", "apierror")); + callback(new customError("rev is a negative number", "apierror")); return; } diff --git a/src/node/db/GroupManager.js b/src/node/db/GroupManager.js index 5f8183ea9..f384f70aa 100644 --- a/src/node/db/GroupManager.js +++ b/src/node/db/GroupManager.js @@ -199,7 +199,7 @@ exports.createGroupIfNotExistsFor = function(groupMapper, callback) { // ensure mapper is optional if (typeof groupMapper != "string") { - callback(new customError("groupMapper is no string", "apierror")); + callback(new customError("groupMapper is not a string", "apierror")); return; } diff --git a/src/node/db/SessionManager.js b/src/node/db/SessionManager.js index 6b580c033..e039ee459 100644 --- a/src/node/db/SessionManager.js +++ b/src/node/db/SessionManager.js @@ -95,7 +95,7 @@ exports.createSession = function(groupID, authorID, validUntil, callback) // ensure this is not a negative number if (validUntil < 0) { - callback(new customError("validUntil is a negativ number", "apierror")); + callback(new customError("validUntil is a negative number", "apierror")); return; } diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index dae71bf6d..ec07bf6e5 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -151,7 +151,7 @@ exports.doImport = function(req, res, padId) padManager.getPad(padId, function(err, _pad) { var headCount = _pad.head; if (headCount >= 10) { - apiLogger.warn("Direct database Import attempt of a pad that already has content, we wont be doing this"); + apiLogger.warn("Direct database Import attempt of a pad that already has content, we won't be doing this"); return callback("padHasData"); } diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 5c20ed1b6..e32d0e61e 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -457,7 +457,7 @@ function handleGetChatMessages(client, message) var count = end - start; if (count < 0 || count > 100) { - messageLogger.warn("Dropped message, GetChatMessages Message, client requested invalid amout of messages!"); + messageLogger.warn("Dropped message, GetChatMessages Message, client requested invalid amount of messages!"); return; } diff --git a/src/node/handler/SocketIORouter.js b/src/node/handler/SocketIORouter.js index c1e78a910..a94080b9d 100644 --- a/src/node/handler/SocketIORouter.js +++ b/src/node/handler/SocketIORouter.js @@ -116,7 +116,7 @@ exports.setSocketIO = function(_socket) { } } else { // drop message - messageLogger.warn("Dropped message cause of bad permissions:" + stringifyWithoutPassword(message)); + messageLogger.warn("Dropped message because of bad permissions:" + stringifyWithoutPassword(message)); } } });