From b9e6f470f3f3cbcbde2cb3675146f5b93693ada7 Mon Sep 17 00:00:00 2001 From: Alex Rice Date: Mon, 9 Dec 2024 11:54:26 +0000 Subject: [PATCH] transformations: (apply-individual-rewrite) improve error message --- xdsl/transforms/individual_rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xdsl/transforms/individual_rewrite.py b/xdsl/transforms/individual_rewrite.py index 67414488e9..5b461c379b 100644 --- a/xdsl/transforms/individual_rewrite.py +++ b/xdsl/transforms/individual_rewrite.py @@ -125,5 +125,5 @@ def apply(self, ctx: MLContext, op: ModuleOp) -> None: pattern.match_and_rewrite(matched_operation, rewriter) if not rewriter.has_done_action: raise ValueError( - f"Invalid rewrite ({pattern}) for operation ({matched_operation}) at location {self.matched_operation_index}." + f"Invalid rewrite ({self.pattern_name}) for operation ({matched_operation}) at location {self.matched_operation_index}." )