lib/adhearsion/call_controller/output.rb in adhearsion-2.0.0.rc2 vs lib/adhearsion/call_controller/output.rb in adhearsion-2.0.0.rc3
- old
+ new
@@ -165,11 +165,11 @@
outputs.each do |output|
begin
result = interruptible_play! output
rescue PlaybackError => e
# Ignore this exception and play the next output
- logger.warn "Error playing back the prompt: #{e.message}"
+ logger.error "Error playing back the prompt: #{e.message}"
ensure
break if result
end
end
result
@@ -255,11 +255,11 @@
output_component.stop! unless output_component.complete?
end
write_and_await_response input_stopper_component
begin
execute_component_and_await_completion output_component
- rescue StandardError
- raise Adhearsion::PlaybackError, "Output failed for argument #{argument.inspect}"
+ rescue ::Punchblock::ProtocolError => e
+ raise PlaybackError, "Output failed for argument #{argument.inspect} due to #{e.inspect}"
end
input_stopper_component.stop! if input_stopper_component.executing?
reason = input_stopper_component.complete_event.reason
result = reason.interpretation if reason.respond_to? :interpretation
return parse_single_dtmf result unless result.nil?