From 18af949c7a1aea856e2b70f754ed35b236ede521 Mon Sep 17 00:00:00 2001 From: tomoaki Date: Fri, 30 Apr 2021 19:21:49 +0900 Subject: [PATCH] Change Execption messages Signed-off-by: tomoaki --- MQTTSNGateway/src/MQTTSNGWProcess.cpp | 4 ++-- MQTTSNGateway/src/mainGateway.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MQTTSNGateway/src/MQTTSNGWProcess.cpp b/MQTTSNGateway/src/MQTTSNGWProcess.cpp index 6db7588..5d16ae4 100644 --- a/MQTTSNGateway/src/MQTTSNGWProcess.cpp +++ b/MQTTSNGateway/src/MQTTSNGWProcess.cpp @@ -164,7 +164,7 @@ int Process::getParam(const char* parameter, char* value) if ((fp = fopen(configPath.c_str(), "r")) == NULL) { - throw Exception("No config file:[" + configPath + "]\n"); + throw Exception("No config file:[" + configPath + "]\n\nUsage: Command -f path/config_file_name\n"); } while (true) @@ -287,7 +287,7 @@ void MultiTaskProcess::run(void) } else if (_stopCount > 0) { - throw Exception(0,"Abort",__FILE__, __func__, __LINE__); + throw Exception("Task stopped !!\n\n"); } sleep(1); } diff --git a/MQTTSNGateway/src/mainGateway.cpp b/MQTTSNGateway/src/mainGateway.cpp index c0b351c..b3c59cb 100644 --- a/MQTTSNGateway/src/mainGateway.cpp +++ b/MQTTSNGateway/src/mainGateway.cpp @@ -42,6 +42,7 @@ int main(int argc, char** argv) catch (Exception &ex) { ex.writeMessage(); + WRITELOG("ABORT Gateway!!!\n\n\n"); abort(); } }