forked from orbit-oss/flask
Better error messages
This commit is contained in:
parent
a06cd0a644
commit
a4ea3159a2
1 changed files with 3 additions and 2 deletions
|
|
@ -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`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue