Skip to content

Commit e56428e

Browse files
Merge pull request codeflash-ai#516 from codeflash-ai/add-one-more-exception-guard
catch yet another exception
2 parents d3bd858 + ea4e2de commit e56428e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codeflash/code_utils/code_extractor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ def add_needed_imports_from_module(
324324
full_package_name=src_module_and_package.package,
325325
)
326326
)
327-
cst.parse_module(src_module_code).visit(gatherer)
327+
try:
328+
cst.parse_module(src_module_code).visit(gatherer)
329+
except Exception as e:
330+
logger.error(f"Error parsing source module code: {e}")
331+
return dst_module_code
328332
try:
329333
for mod in gatherer.module_imports:
330334
AddImportsVisitor.add_needed_import(dst_context, mod)

0 commit comments

Comments
 (0)