Catch exceptions during processing (Fix for logstash issue #1553)