diff options
| author | Ted Ross <tross@apache.org> | 2009-11-10 15:25:30 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-11-10 15:25:30 +0000 |
| commit | 903d5e2b917e33042b950f79cd981fce6233b8db (patch) | |
| tree | 0a489375a448b8e7d790936d20695a71ff83ae86 /qpid/cpp/bindings/qmf | |
| parent | bd53c1d4c4fc6781bbe612d8de3b9e3874ef5f64 (diff) | |
| download | qpid-python-903d5e2b917e33042b950f79cd981fce6233b8db.tar.gz | |
Added limited backtracing for exceptions raised in console callbacks.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@834498 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/qmf')
| -rw-r--r-- | qpid/cpp/bindings/qmf/ruby/qmf.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qpid/cpp/bindings/qmf/ruby/qmf.rb b/qpid/cpp/bindings/qmf/ruby/qmf.rb index 68a5ae7755..b52f2bce5e 100644 --- a/qpid/cpp/bindings/qmf/ruby/qmf.rb +++ b/qpid/cpp/bindings/qmf/ruby/qmf.rb @@ -865,6 +865,7 @@ module Qmf @sync_count = nil @sync_result = nil @select = [] + @bt_count = 0 @cb_cond = new_cond @cb_thread = Thread.new do run_cb_thread @@ -1061,8 +1062,12 @@ module Qmf @handler.agent_heartbeat(AgentProxy.new(@event.agent, nil), @event.timestamp) if @handler when Qmfengine::ConsoleEvent::METHOD_RESPONSE end - rescue - puts "Exception caught in callback thread: #{$!}" + rescue Exception => ex + puts "Exception caught in callback: #{ex}" + if @bt_count < 2 + puts ex.backtrace + @bt_count += 1 + end end @impl.popEvent valid = @impl.getEvent(@event) |
