Skip to content

Commit dce7bc3

Browse files
committed
catch all exceptions
1 parent b23fcff commit dce7bc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/tracer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def tracer_logic(self, frame: FrameType, event: str) -> None: # noqa: PLR0911
379379
del arguments_copy["self"]
380380
local_vars = pickle.dumps(arguments_copy, protocol=pickle.HIGHEST_PROTOCOL)
381381
sys.setrecursionlimit(original_recursion_limit)
382-
except (TypeError, pickle.PicklingError, AttributeError, RecursionError, OSError):
382+
except Exception:
383383
# we retry with dill if pickle fails. It's slower but more comprehensive
384384
try:
385385
sys.setrecursionlimit(10000) # Ensure limit is high for dill too
@@ -390,7 +390,7 @@ def tracer_logic(self, frame: FrameType, event: str) -> None: # noqa: PLR0911
390390
)
391391
sys.setrecursionlimit(original_recursion_limit)
392392

393-
except (TypeError, dill.PicklingError, AttributeError, RecursionError, OSError):
393+
except Exception:
394394
self.function_count[function_qualified_name] -= 1
395395
return
396396

0 commit comments

Comments
 (0)