diff options
Diffstat (limited to 'cpp/tests/topic_publisher.cpp')
| -rw-r--r-- | cpp/tests/topic_publisher.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/tests/topic_publisher.cpp b/cpp/tests/topic_publisher.cpp index 6d17b7034f..5761acc4aa 100644 --- a/cpp/tests/topic_publisher.cpp +++ b/cpp/tests/topic_publisher.cpp @@ -110,12 +110,12 @@ public: inline bool getHelp() const { return help; } }; -int main(int argc, char** argv){ +int main(int argc, char** argv) { Args args; args.parse(argc, argv); if(args.getHelp()){ args.usage(); - }else{ + } else { try{ Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); @@ -156,10 +156,12 @@ int main(int argc, char** argv){ } channel.close(); connection.close(); - }catch(qpid::QpidError error){ + return 0; + }catch(qpid::QpidError error) { std::cout << error.what() << std::endl; } } + return 1; } Publisher::Publisher(Channel* _channel, const std::string& _controlTopic, bool tx) : |
