Programming__WebObjects-Web Applications-Development-Custom Error Handling

Version 1.1 by smmccraw on 2007/07/08 09:45

Exception Page

To provide a custom error handler when an exception is thrown, override the method:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

For example:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

Session Expired

To provide a custom error handler when an exception is thrown, override the method:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

For example:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

Your Request Produced an Error

Chuck Hill

This message started to appear in WO 5.2 when an exception was raised in a DirectAction, but only in deployed applications. Here is what is happening:

WODisplayExceptionPages
true or false to enable or disable the generation of WOExceptionPages for direct action requests. Default is true in development mode and false in deployment mode.

From http://developer.apple.com/documentation/WebObjects/WOAppProperties/AppProperties/chapter_1_section_1.html

If the page being returned throws during appendToResponse and the app is deployed, all that is displayed is a blank page with the words "Your request produced an error".

To avoid this, either add this to the launch agruments:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

Or change the main method in your Application class to look like this:

Error

There is no valid license for Pro Macros. Please visit the Licenses section.

This won't work if you put it in the constructor.

Category:WebObjects