Skip to Content

Use of Error Pages

Hallo Suresh,

> Could you please tell me why there is an error page

> in the BSP page/controller attribute

The error page in MVC was plan long time ago so that when an error happened somewhere in a controller/view, then the error page will be triggered to handle the rendering (for example message of error and info on how to call for help). Also, once the error page is processed, the rest of the controller tree is processed.

However, the MVC design/implementation was done in parallel to that of the BSP extensions and the HTMLB library. The problem is that the HTMLB library has an expected hierarchy that must be in place. Once an error happens, you have no idea of what the current state of the hierarchy is, and how was rendered. And now suddenly, if you try to again use the htmlb content tag in the error page, you get a new exception that the content tag is already on the stack. These two designs clashed here.

My very personal feeling: do not use error pages. They are not helping you. For real error handling of the termination kind, just raise exception. This is caught in the kernel and outputed into browser. If you then want a specific formatted page (mobile number of manager:), use the features of ICF for this node to configure custom error pages.

For other error messages to display, gather them and display them any way you like. If you are using textView, consider to look into PHTMLB library. There is a messageBar tag (but it can only display one message unfortunately) or my favourite, the formatted text.

++bcm

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 19, 2004 at 12:42 AM

    Brian,

    Thanks for your clarification. Yes, I used PHTMLB and also cute Icons to display Warning and Error messages in the event of an error. I used iteration to display multiple error messages in the view.

    Thanks,

    Suresh

    Add comment
    10|10000 characters needed characters exceeded