Skip to content

Commit f3a9dbe

Browse files
committed
fixing naked exceptions
1 parent 8bd3bb8 commit f3a9dbe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/hyperbase/parsers/correctness.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _visit(current_edge: Hyperedge) -> None:
3232
)
3333
)
3434

35-
except Exception:
35+
except (IndexError, RuntimeError):
3636
pass
3737

3838
# Junction checks
@@ -52,7 +52,7 @@ def _visit(current_edge: Hyperedge) -> None:
5252
3,
5353
)
5454
)
55-
except Exception:
55+
except (IndexError, RuntimeError):
5656
pass
5757

5858
if current_errors:
@@ -312,7 +312,7 @@ def count_unmatched_roots(root_value: str) -> int:
312312
if len(token_matching_errors) > 0:
313313
errors["token-matching"] = token_matching_errors
314314

315-
except (AttributeError, Exception):
315+
except (AttributeError, IndexError, RuntimeError):
316316
# If token counting fails (e.g., edge is invalid), skip it
317317
pass
318318

0 commit comments

Comments
 (0)