File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ def use_span(
588588 finally :
589589 context_api .detach (token )
590590
591- except BaseException as exc : # pylint: disable=broad-exception-caught
591+ except Exception as exc : # pylint: disable=broad-exception-caught
592592 if isinstance (span , Span ) and span .is_recording ():
593593 # Record the exception as an event
594594 if record_exception :
Original file line number Diff line number Diff line change @@ -133,18 +133,6 @@ class TestUseSpanException(Exception):
133133
134134 self .assertEqual (test_span .recorded_exception , exception )
135135
136- def test_use_span_base_exception (self ):
137- class TestUseSpanBaseException (BaseException ):
138- pass
139-
140- test_span = SpanTest (trace .INVALID_SPAN_CONTEXT )
141- exception = TestUseSpanBaseException ("test exception" )
142- with self .assertRaises (TestUseSpanBaseException ):
143- with trace .use_span (test_span ):
144- raise exception
145-
146- self .assertEqual (test_span .recorded_exception , exception )
147-
148136 def test_use_span_set_status (self ):
149137 class TestUseSpanException (Exception ):
150138 pass
You can’t perform that action at this time.
0 commit comments