Skip to content

Graph-Native Infrastructure for Context and Accountable AI Systems

fix(reasoning): surface regex matching errors and verify pattern matcher integrity

ZohaibHassan1632d0fe105c1c
diff --git a/semantica/reasoning/reasoner.py b/semantica/reasoning/reasoner.py
index 1c3199af..1bfe30a1 100644
--- a/semantica/reasoning/reasoner.py
+++ b/semantica/reasoning/reasoner.py
@@ -363,9 +363,8 @@ class Reasoner:
return None # Binding conflict
new_bindings[var] = value
return new_bindings
- except Exception:
- pass
-
+ except Exception as e:
+ self.logger.warning(f"Error matching pattern '{pattern}' (regex: '{p_regex}') against fact '{fact}': {e}")
return None