Skip to content

Commit 0b1648f

Browse files
Add messages when things go wrong
1 parent dab4760 commit 0b1648f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/pretty-printers/gdb/pretty_printers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ def to_string(self):
4242
if value.is_optimized_out:
4343
return "{}: <Optimized out>".format(string_no)
4444
return "{}: \"{}\"".format(string_no, value.string().replace("\0", "").replace("\"", "\\\""))
45+
except RuntimeError as e:
46+
return "Exception evaluating dstringt: {}".format(e.message)
4547
except:
46-
return ""
48+
return "Exception evaluating dstringt"
4749

4850
def display_hint(self):
4951
return None

0 commit comments

Comments
 (0)