lib/adhearsion/call_controller/output/async_player.rb in adhearsion-2.6.4 vs lib/adhearsion/call_controller/output/async_player.rb in adhearsion-3.0.0.beta1

- old
+ new

@@ -10,16 +10,16 @@ # @raise [PlaybackError] if (one of) the given argument(s) could not be played # def output(content, options = {}) options.merge! :ssml => content component = new_output options - component.register_event_handler Punchblock::Event::Complete do |event| - controller.logger.error event if event.reason.is_a?(Punchblock::Event::Complete::Error) + component.register_event_handler Adhearsion::Event::Complete do |event| + controller.logger.error event if event.reason.is_a?(Adhearsion::Event::Complete::Error) throw :pass end controller.write_and_await_response component component - rescue Punchblock::ProtocolError => e + rescue Adhearsion::ProtocolError => e raise PlaybackError, "Async output failed due to #{e.inspect}" end end end end