Update 9c214a and 438a9a1

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2020-10-13 11:19:12 +09:00
parent 5041caf7a2
commit b4a598e895
3 changed files with 11 additions and 3 deletions

View File

@@ -162,8 +162,7 @@ int Process::getParam(const char* parameter, char* value)
if ((fp = fopen(configPath.c_str(), "r")) == NULL)
{
WRITELOG("No config file:[%s]\n", configPath.c_str());
return -1;
throw Exception("No config file:[" + configPath + "]\n");
}
while (true)

View File

@@ -17,6 +17,6 @@
#ifndef MQTTSNGWVERSION_H_IN_
#define MQTTSNGWVERSION_H_IN_
#define PAHO_GATEWAY_VERSION "1.3.2"
#define PAHO_GATEWAY_VERSION "1.4.0"
#endif /* MQTTSNGWVERSION_H_IN_ */

View File

@@ -36,5 +36,14 @@ int main(int argc, char** argv)
{
gateway.initialize(argc, argv);
gateway.run();
try
{
gateway.initialize(argc, argv);
gateway.run();
}
catch (const std::exception &ex) {
WRITELOG("\nEclipse Paho MQTT-SN Gateway exception: %s\n", ex.what());
WRITELOG("MQTT-SNGateway [-f Config file name]\n");
}
return 0;
}