Skip to content

Commit

Permalink
Update the Application object to have a useful error message when a p…
Browse files Browse the repository at this point in the history
…roxy

widget isn't found.
  • Loading branch information
sccolbert committed Apr 2, 2013
1 parent c612be0 commit b264b3b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions enaml/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ def create_proxy(self, declaration):
cls = resolver.resolve(name)
if cls is not None:
return cls(declaration=declaration)
msg = "could not resolve a toolkit implementation for the '%s' "
msg += "component when running under a '%s'"
d_name = type(declaration).__name__
a_name = type(self).__name__
raise TypeError(msg % (d_name, a_name))

def schedule(self, callback, args=None, kwargs=None, priority=0):
""" Schedule a callable to be executed on the event loop thread.
Expand Down

0 comments on commit b264b3b

Please sign in to comment.