Skip to content

Commit cfce332

Browse files
committed
If any problem occurred then compact name should be nil
1 parent 20a3a3c commit cfce332

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,16 @@ def compact_array_str(value)
354354
compact[0..compact.size-2] + ", ...]"
355355
end
356356
compact
357+
rescue
358+
nil
357359
end
358360

359361
def compact_hash_str(value)
360362
slice = value.sort_by { |k, _| k.to_s }[0..5]
361363
compact = slice.map { |kv| "#{kv[0]}: #{handle_binary_data(kv[1])}" }.join(", ")
362364
"{" + compact + (slice.size != value.size ? ", ..." : "") + "}"
365+
rescue
366+
nil
363367
end
364368

365369
def build_compact_value_attr(value)

0 commit comments

Comments
 (0)