Skip to content

Commit c38e7c0

Browse files
committed
It is #build_compact_name who is responsible for rescuing all exception.
1 parent cfce332 commit c38e7c0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/ruby-debug-ide/xml_printer.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ def build_compact_name(value)
345345
return compact_array_str(value) if value.is_a?(Array)
346346
return compact_hash_str(value) if value.is_a?(Hash)
347347
nil
348+
rescue ::Exception => e
349+
print_debug(e)
350+
nil
348351
end
349352

350353
def compact_array_str(value)
@@ -354,16 +357,12 @@ def compact_array_str(value)
354357
compact[0..compact.size-2] + ", ...]"
355358
end
356359
compact
357-
rescue
358-
nil
359360
end
360361

361362
def compact_hash_str(value)
362363
slice = value.sort_by { |k, _| k.to_s }[0..5]
363364
compact = slice.map { |kv| "#{kv[0]}: #{handle_binary_data(kv[1])}" }.join(", ")
364365
"{" + compact + (slice.size != value.size ? ", ..." : "") + "}"
365-
rescue
366-
nil
367366
end
368367

369368
def build_compact_value_attr(value)

0 commit comments

Comments
 (0)