logstash-filter-ruby
logstash-filter-ruby copied to clipboard
avoid rescuing all exception from inline script
When an unexpected exception occurs with an code => ... inline script, the plugin catches everything due rescue Exception.
This isn't ideal as it will also catch any serious java.lang.Error throwables such as OutOfMemoryError and recover from them.
The issue only concerns inline script, path => ... script reach a default rescue => e form and thus won't recover from errors.
History shows there might not have been a clear intent to rescue "everything", rescue Exception dates back to the (1.0.0) initial support for recovering from Ruby exceptions. Which than got refactored (probably to keep compatibility) with the addition of file based scripting.