Compatibility with slight API change of ActiveMQ (backported from HEAD).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 15 Jan 2013 17:17:15 +0000 (17:17 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 16 Jan 2013 10:55:15 +0000 (11:55 +0100)
org.glite.lb.logger-msg/examples/cmsclient.cpp

index d703cf2..2160272 100644 (file)
@@ -79,7 +79,7 @@ public:
                this->clientAck = clientAck;
        }
 
-       virtual ~SimpleAsyncConsumer(){
+       virtual ~SimpleAsyncConsumer() throw() {
                this->cleanup();
        }
 
@@ -132,7 +132,7 @@ public:
        }
 
        // Called from the consumer since this class is a registered MessageListener.
-       virtual void onMessage( const Message* message ){
+       virtual void onMessage( const Message* message ) throw() {
 
                static int count = 0;
 
@@ -157,6 +157,10 @@ public:
                        fflush(outputfile);
                } catch (CMSException& e) {
                        e.printStackTrace();
+               } catch (Exception& e) {
+                       e.printStackTrace();
+               } catch (...) {
+                       fprintf(stderr, "Unknown Exception occurred.\n");
                }
        }