From 6fb79a34ee3b2883a57e5ef97de06fc808e049ab Mon Sep 17 00:00:00 2001 From: Mikhail Chechnev Date: Mon, 7 Jan 2019 17:48:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B8=D1=85=D0=BE=D0=B5=20=D0=B8=20?= =?UTF-8?q?=D0=B0=D1=81=D0=B8=D0=BD=D1=85=D1=80=D0=BE=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=B2=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4=D1=8C=20=D1=83?= =?UTF-8?q?=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/notifier.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/notifier.js b/core/notifier.js index d2980b5..66a24ab 100644 --- a/core/notifier.js +++ b/core/notifier.js @@ -63,7 +63,7 @@ class Notifier extends EventEmitter { } } //Добавление уведомления в очередь отправки - addMessage(prms) { + async addMessage(prms) { //Проверяем структуру переданного объекта для старта let sCheckResult = validateObject( prms, @@ -76,7 +76,11 @@ class Notifier extends EventEmitter { tmp.bSent = false; this.messages.push(tmp); } else { - throw new ServerError(SERR_OBJECT_BAD_INTERFACE, sCheckResult); + await this.logger.error( + `Ошибка добавления уведомления в очередь: ${makeErrorText( + new ServerError(SERR_OBJECT_BAD_INTERFACE, sCheckResult) + )}` + ); } } //Уведомление о запуске модуля