Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
viuginick1 committed Jul 1, 2017
commit 045a84c31ea3a2dc6f23b58a9ef14e4267f631dc
4 changes: 1 addition & 3 deletions lib/ruby-debug-ide/xml_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@ def inspect_with_allocation_control(slice, memory_limit)
trace.disable
rescue MemoryLimitError
return nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it makes sense to add some logging for such cases? Or return something very special

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added logging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think printing also a stacktrace of an exception may help investigating the problems in inspect calls for users.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This backtrack will end with the calls of our debase and r-d-i methods. I think that this is not very useful.

end

end

def compact_array_str(value)
slice = value[0..10]
Expand All @@ -422,7 +421,6 @@ def compact_array_str(value)
compact
end


def compact_hash_str(value)
slice = value.sort_by { |k, _| k.to_s }[0..5]
compact = slice.map { |kv| "#{kv[0]}: #{handle_binary_data(kv[1])}" }.join(", ")
Expand Down