Hi Gustav,
after reading your post several times, I still fail to grasp its
meaning. Can you elaborate?
- Are you talking about TG2 or TG1?
- Do you have a specific problem, i.e. non-working-code, that needs to
be solved? Can you provide that code?
Chris
> So it looks like the class ErrorController is actually not used at
> all, does not override any default (Pylons?) error manager.
>
> You can check yourself: raise an exception in
> ErrorController.document() : nothing special happen.
This is a bug in the default template. The ErrorController should
not inherit from BaseController, which is a special TurboGears
controller and screws up routing. You want it to inherit from
WSGIController:
from pylons.controllers import WSGIController
class ErrorController(WSGIController):
...
I had this very problem just yesterday, but this fixed it, and now I
am getting my customized error document when problems arise.
--
Jonathan LaCour
http://cleverdevil.org
> Another silly question : how can I know the exception that
> was raised while in the 'document' method? It would be useful
> to write my error message... In the environ variable, except
> 'paste.evalexception' (which doesn't seems to be what I want)
> nothing looks like an exception report!
I don't have an answer to that particular question. You might want
to ask that on the Pylons list.
However, I can tell you what I do, which is to configure the error
handler to send an email to a special address with the full error
message, trace back, WSGI environment, etc. I also configure the
error handler to write all this information to a log file on the
servers: You can do the same using the following configuration
parameters:
from_address = err...@yourdomain.com
email_to = err...@yourdomain.com
smtp_server = localhost
error_subject_prefix = Application Error:
error_log = /tmp/error.log
Best of luck to you.