Skip to content

Commit 0c92dbd

Browse files
committed
catch errs
1 parent 0e40e41 commit 0c92dbd

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

sourceplusplus/control/ContextReceiver.py

+11-8
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,17 @@ def apply_breakpoint(live_breakpoint_id, globals, locals):
104104
context: SpanContext = get_context()
105105

106106
with context.new_local_span(op=operation) as span:
107-
for key, value in globals.items():
108-
tag = StringTag(json.dumps({
109-
key: str(value), # todo: don't str everything
110-
"@class": str(type(value)),
111-
"@identity": id(value)
112-
}))
113-
tag.key = "spp.global-variable:" + live_breakpoint.id + ":" + key
114-
span.tag(tag)
107+
try:
108+
for key, value in globals.items():
109+
tag = StringTag(json.dumps({
110+
key: str(value), # todo: don't str everything
111+
"@class": str(type(value)),
112+
"@identity": id(value)
113+
}))
114+
tag.key = "spp.global-variable:" + live_breakpoint.id + ":" + key
115+
span.tag(tag)
116+
except Exception:
117+
pass
115118

116119
for key, value in locals.items():
117120
tag = StringTag(json.dumps({

0 commit comments

Comments
 (0)