#2227: Request: better error message when template path has missing component
-------------------------+--------------------------------------------------
Reporter: Kylotan | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.0rc1
Component: TurboGears | Version: 2.0b5
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
If part of the dotted notation template path is wrong or missing, you see
a confusing ImportError, despite not having explicitly asked to import
anything. This would appear to be a 'leaky abstraction' from the package-
based implementation of hierarchical template paths. Additionally, the
call stack is hard to debug because it does not contain any reference to
the file that causes the error (eg. the controller with the wrong template
path).
It would probably be possible to catch this exception nearer where it is
thrown and re-throw a prettier one?
Sample trivial controller:
{{{
@expose(template="projectname.templates.spurious.index")
def index(self):
return dict()
}}}
Note that there would be no 'spurious' directory under the templates
directory.
Call stack attached.
--
Ticket URL: <http://trac.turbogears.org/ticket/2227>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---