Commit af30de84b9cfb5bd12bc52e7b5fb4f2472106a23
1 parent
041494a8
Exists in
master
and in
22 other branches
metadata: Don't rescue errors
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
plugins/metadata/lib/metadata_plugin.rb
| ... | ... | @@ -50,7 +50,7 @@ class MetadataPlugin < Noosfero::Plugin |
| 50 | 50 | return unless options |
| 51 | 51 | |
| 52 | 52 | return unless object = case variable = options[:variable] |
| 53 | - when Proc then instance_exec(&variable) rescue nil | |
| 53 | + when Proc then instance_exec(&variable) | |
| 54 | 54 | else instance_variable_get variable |
| 55 | 55 | end |
| 56 | 56 | return unless specs = (object.class.metadata_specs rescue nil) |
| ... | ... | @@ -64,11 +64,11 @@ class MetadataPlugin < Noosfero::Plugin |
| 64 | 64 | |
| 65 | 65 | tags.each do |key, values| |
| 66 | 66 | key = "#{namespace}#{key}" |
| 67 | - values = values.call(object, plugin) rescue nil if values.is_a? Proc | |
| 67 | + values = values.call(object, plugin) if values.is_a? Proc | |
| 68 | 68 | next if values.blank? |
| 69 | 69 | |
| 70 | 70 | Array(values).each do |value| |
| 71 | - value = value.call(object, plugin) rescue nil if value.is_a? Proc | |
| 71 | + value = value.call(object, plugin) if value.is_a? Proc | |
| 72 | 72 | next if value.blank? |
| 73 | 73 | r << tag(:meta, key_attr => key, value_attr => value) |
| 74 | 74 | end | ... | ... |