Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/observable/instrumenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def extract_namespace_from_path(file_path)
return "UnknownClass" if file_name.empty?

file_name.split("_").map(&:capitalize).join
rescue
rescue StandardError
"UnknownClass"
end

Expand All @@ -65,14 +65,14 @@ def extract_actual_class_name
else
caller_self.class.name
end
rescue
rescue StandardError
extract_namespace_from_path(@caller_binding.eval("__FILE__"))
end
else
caller_location = find_caller_location
extract_namespace_from_path(caller_location.path)
end
rescue
rescue StandardError
"UnknownClass"
end

Expand All @@ -82,7 +82,7 @@ def determine_if_class_method
begin
caller_self = @caller_binding.eval("self")
caller_self.is_a?(Class)
rescue
rescue StandardError
false
end
end
Expand Down Expand Up @@ -353,7 +353,7 @@ def extract_from_binding
extract_local_variables_with_numeric_indexing(args)

args
rescue
rescue StandardError
{}
end

Expand Down
8 changes: 4 additions & 4 deletions lib/observable/structured_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def self.safe_message(error)
else
""
end
rescue
rescue StandardError
""
end

Expand All @@ -63,7 +63,7 @@ def self.safe_type(error)
end

error.class.name
rescue
rescue StandardError
error.class.name
end

Expand All @@ -77,7 +77,7 @@ def self.safe_context(error)
else
{}
end
rescue
rescue StandardError
{}
end

Expand All @@ -92,7 +92,7 @@ def self.try_custom_converter(error)

result = begin
converter.call(error)
rescue
rescue StandardError
nil
end

Expand Down