Project

General

Profile

Feature #738

DebuggingPageMaker needs a fallback error page for errors that occur in the error page

Added by Jan Klopper about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Elmer de Looff
Category:
PageMaker
Target version:
Start date:
2012-04-10
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

If you call upon a non existing model class the uweb stack crashes, no debugging info is created, nor is the log appended with usefull information.

example;

If you call upon model.Aclass.FromPrimary(...

Where you should have done:

model.AClass.FromPrimary(... the stack crashes without any details of what went wrong, making debugging very hard.

Associated revisions

Revision 209:72093b2792ed (diff)
Added by Elmer de Looff about 12 years ago

Added functionality to the DebuggingPageMaker to catch errors in its error page. That is, if an error occurs in the rendering of the verbose debugging page, a more terse page is presented with the debugging exception and the original exception. This resolves #738.

History

#1 Updated by Elmer de Looff about 12 years ago

  • Status changed from New to Feedback
  • Assignee changed from Elmer de Looff to Jan Klopper

Are you sure this is actually happening? I just tried with a misnamed class in the logging module and got the following:

<type 'exceptions.AttributeError'>
'module' object has no attribute 'LOgging'

This was part of the usual uWeb http 500 debugging output, which is provided when using DebuggingPageMaker.

Please provide more context and a reproducible case.

#2 Updated by Jan Klopper about 12 years ago

Hmm, yes, as soon as I called on the non existing model class, the webpage would simply timeout, and the log would get 'an excetption happened'. This while using the standalone server with a debuggingPageMaker.

Ill see if I can create a small test setup.

#3 Updated by Jan Klopper about 12 years ago

  • Assignee changed from Jan Klopper to Elmer de Looff

So ok, we basically need an error page for the error page. You want a new bug for this? Or can we handle it in this one?

#4 Updated by Elmer de Looff about 12 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from using an invalid model class throws an unhandled exception, resulting in a reset connection to DebuggingPageMaker needs a fallback error page for errors that occur in the error page
  • Category set to PageMaker
  • Target version set to µWeb alpha release

#5 Updated by Elmer de Looff about 12 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 70

Applied in changeset 72093b2792ed.

#6 Updated by Elmer de Looff about 12 years ago

  • Assignee changed from Elmer de Looff to Jan Klopper

Jan,

Could you verify this fixes the problem you originally encountered? Also, could you describe the exact error condition, so we can create tests for this?

#7 Updated by Jan Klopper about 12 years ago

  • Assignee changed from Jan Klopper to Elmer de Looff

Elmer is going to test the issue of a deeploading an non existing object when trying to str an object on the initial debuggingpagemaker debug page.

#8 Updated by Elmer de Looff about 12 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 70 to 100

Verified using a string class that raises an exception on being printed. This correctly triggers the error page for the error page, which itself renders perfectly fine.

Also available in: Atom PDF