Skip to content

Commit

Permalink
Trace
Browse files Browse the repository at this point in the history
  • Loading branch information
obourdon committed Jan 26, 2023
1 parent e50daed commit 9727934
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/awesome_print/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,17 @@ def convert_to_hash(object)
return nil if object.respond_to?(:permitted?) && !object.permitted?

begin
STDERR.puts 'OLIVIER1a'
puts 'OLIVIER1'
puts caller
hash = object.to_hash
return nil if !hash.respond_to?(:keys) || !hash.respond_to?(:[])

hash
rescue
STDERR.puts 'OLIVIER2a'
puts 'OLIVIER2'
puts caller
return { class: object.class.name, contents: object.inspect }
end
end
Expand Down

0 comments on commit 9727934

Please sign in to comment.