From a055fa845ada289809d450965cd323f337425fd5 Mon Sep 17 00:00:00 2001 From: Matthias Diener <mdiener@illinois.edu> Date: Tue, 11 May 2021 10:49:45 -0500 Subject: [PATCH] add prefix --- pytools/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytools/__init__.py b/pytools/__init__.py index bd654ea..2d4b465 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -2178,7 +2178,8 @@ class UniqueNameGenerator: if self.is_name_conflicting(name): raise ValueError("name '%s' conflicts with existing names" % name) if not name.startswith(self.forced_prefix): - raise ValueError("name '%s' does not start with required prefix" % name) + raise ValueError("name '%s' does not start with required prefix '%s'" + % (name, self.forced_prefix)) self.existing_names.add(name) self._name_added(name) -- GitLab