Skip to content

Commit bf453d7

Browse files
Do not fail on collecting symbols
Reference: #1565 Reference: #1564 Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent d9f50b1 commit bf453d7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scanpipe/pipes/symbols.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,15 @@ def collect_and_store_tree_sitter_symbols_and_strings(
146146
progress = LoopProgress(resources_count, logger)
147147

148148
for resource in progress.iter(resource_iterator):
149-
_collect_and_store_tree_sitter_symbols_and_strings(resource)
149+
try:
150+
_collect_and_store_tree_sitter_symbols_and_strings(resource)
151+
except Exception as e:
152+
project.add_error(
153+
description=f"Cannot collect strings from resource at {resource.path}",
154+
exception=e,
155+
model="collect_and_store_tree_sitter_symbols_and_strings",
156+
details={"resource_path": resource.path},
157+
)
150158

151159

152160
def _collect_and_store_tree_sitter_symbols_and_strings(resource):

0 commit comments

Comments
 (0)