Skip to content

Commit 25e9a30

Browse files
committed
catch stray exceptions in comparator that can happen when dealing with user objects. Currently codeflash crashes when an exception is raised here.
1 parent 6725dce commit 25e9a30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

codeflash/verification/comparator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,7 @@ def comparator(orig: Any, new: Any, superset_obj=False) -> bool:
244244
logger.error(f"RecursionError while comparing objects: {e}")
245245
sentry_sdk.capture_exception(e)
246246
return False
247+
except Exception as e:
248+
logger.error(f"Error while comparing objects: {e}")
249+
sentry_sdk.capture_exception(e)
250+
return False

0 commit comments

Comments
 (0)