lib/submodules/ably-ruby/lib/ably/modules/async_wrapper.rb in ably-rest-0.7.5 vs lib/submodules/ably-ruby/lib/ably/modules/async_wrapper.rb in ably-rest-0.8.1
- old
+ new
@@ -45,11 +45,12 @@
deferrable.callback &success_callback if success_callback
operation_with_exception_handling = proc do
begin
yield
- rescue StandardError => e
- deferrable.fail e
+ rescue StandardError => err
+ logger.error "An exception in an AsyncWrapper block was caught. #{err.class}: #{err.message}\n#{err.backtrace.join("\n")}"
+ deferrable.fail err
end
end
complete_callback = proc do |result|
deferrable.succeed result