diff --git a/pyramid/config.py b/pyramid/config.py index 917b689b1b..60d406a62b 100644 --- a/pyramid/config.py +++ b/pyramid/config.py @@ -995,10 +995,10 @@ def _add_tween(self, tween_factory, alias=None, under=None, over=None, raise ConfigurationError('%s is a reserved tween name' % alias) if over is INGRESS: - raise ConfigurationError('%s cannot be over INGRESS') + raise ConfigurationError('%s cannot be over INGRESS' % name) if under is MAIN: - raise ConfigurationError('%s cannot be under MAIN') + raise ConfigurationError('%s cannot be under MAIN' % name) registry = self.registry tweens = registry.queryUtility(ITweens)