Sorry if I wasn't clear!

Working on TG2, I'd like to handle exception thown by my code.
Today, when I throw an exception, I can see it in the apache or paster
log; but I have no control about what the user can see on his browser.
It is always a HTML saying "404 error blablabla", no matter it is
actually a 403, a 500, and no explanation about what went wrong.

In TG2 there is apparently no exception_handler like in TG1, it looks
like it is replaced by the ErrorController class generated in a
quickstart project. The method 'document' seems to be responsible for
the display of the error on the client side. So I tried to modify it
to return JSON instead of HTML and more precise error message,
depending on the exception...
But anything I can modify in that method doesn't change the behavior
of error messaging : it is always HTML 404 code.

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.


GustaV

On Sep 16, 2:12 pm, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> GustaV wrote:
> > Up! : )
>
> > On Sep 15, 11:00 am, GustaV <[EMAIL PROTECTED]> wrote:
> >> It seems the exception_handler was replaced by the special
> >> ErrorDocument controller. The document method being where the thing
> >> happen when an exception occurs.
> >> But any change in that method is not reflected in real world (event
> >> make it empty) : is there something to do to reference that class?
>
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to