lib/syslogstash/logstash_writer.rb in syslogstash-0.1.3 vs lib/syslogstash/logstash_writer.rb in syslogstash-0.1.4
- old
+ new
@@ -54,9 +54,12 @@
end
# If we got here, we sent successfully, so we don't want
# to put the entry back on the queue in the ensure block
entry = nil
+ rescue StandardError => ex
+ $stderr.puts "Unhandled exception: #{ex.message} (#{ex.class})"
+ $stderr.puts ex.backtrace.map { |l| " #{l}" }.join("\n")
ensure
@entries_mutex.synchronize { @entries.unshift if entry }
end
end
end