From 5c52a1984357b3f0145eac2d146d44cb8e41afb4 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 14 Jun 2007 13:03:22 +0000 Subject: Fixed catch clauses to catch by const & and use std::exception for "generic" catches. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547241 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/echo_service.cpp | 4 ++-- cpp/src/tests/interop_runner.cpp | 2 +- cpp/src/tests/topic_listener.cpp | 2 +- cpp/src/tests/topic_publisher.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cpp/src/tests') diff --git a/cpp/src/tests/echo_service.cpp b/cpp/src/tests/echo_service.cpp index 09cf1e01bb..c4f1f0477a 100644 --- a/cpp/src/tests/echo_service.cpp +++ b/cpp/src/tests/echo_service.cpp @@ -135,7 +135,7 @@ int main(int argc, char** argv){ } connection.close(); - } catch(qpid::QpidError error) { + } catch(std::exception& error) { std::cout << error.what() << std::endl; } } else { @@ -164,7 +164,7 @@ int main(int argc, char** argv){ channel.run(); connection.close(); - } catch(qpid::QpidError error) { + } catch(std::exception& error) { std::cout << error.what() << std::endl; } } diff --git a/cpp/src/tests/interop_runner.cpp b/cpp/src/tests/interop_runner.cpp index 26639ede17..7d40eeedb1 100644 --- a/cpp/src/tests/interop_runner.cpp +++ b/cpp/src/tests/interop_runner.cpp @@ -116,7 +116,7 @@ int main(int argc, char** argv){ channel.run(); connection.close(); - } catch(qpid::Exception error) { + } catch(const std::exception& error) { std::cout << error.what() << std::endl; } } diff --git a/cpp/src/tests/topic_listener.cpp b/cpp/src/tests/topic_listener.cpp index 8af8f007d9..9fb3ee8371 100644 --- a/cpp/src/tests/topic_listener.cpp +++ b/cpp/src/tests/topic_listener.cpp @@ -125,7 +125,7 @@ int main(int argc, char** argv){ connection.close(); cout << "topic_listener: normal exit" << endl; return 0; - }catch(qpid::QpidError error){ + }catch(const std::exception& error){ cout << "topic_listener: " << error.what() << endl; } } diff --git a/cpp/src/tests/topic_publisher.cpp b/cpp/src/tests/topic_publisher.cpp index 7c16dd71f3..9384053e68 100644 --- a/cpp/src/tests/topic_publisher.cpp +++ b/cpp/src/tests/topic_publisher.cpp @@ -157,7 +157,7 @@ int main(int argc, char** argv) { channel.close(); connection.close(); return 0; - }catch(qpid::QpidError error) { + }catch(std::exception& error) { std::cout << error.what() << std::endl; } } -- cgit v1.2.1