From a4ea3159a27d775b53774cea2d47c733a460fb93 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 25 Apr 2011 16:01:58 +0200 Subject: [PATCH] Better error messages --- flask/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flask/app.py b/flask/app.py index 243ae4a3..6a637554 100644 --- a/flask/app.py +++ b/flask/app.py @@ -574,10 +574,11 @@ class Flask(_PackageBoundObject): if blueprint.name in self.blueprints: assert self.blueprints[blueprint.name] is blueprint, \ 'A blueprint\'s name collision ocurred between %r and ' \ - '%r.' % (blueprint, self.blueprints[blueprint.name]) + '%r. Both share the same name "%s"' % \ + (blueprint, self.blueprints[blueprint.name], blueprint.name) else: self.blueprints[blueprint.name] = blueprint - blueprint.register(self, **options) + blueprint.register(self, options) def add_url_rule(self, rule, endpoint=None, view_func=None, **options): """Connects a URL rule. Works exactly like the :meth:`route`