RAS Exception Handling


Options for displaying and logging exception information can also be specified. These tasks can be performed by modifying the web.xml file (located by default in the \WEB-INF\ directory of your Web application) as follows.

Displaying Exceptions

Three options exist for displaying exception information to the user. Setting the crystal_exception_info parameter to one of the following values determines how exceptions are handled:

  • short The exception information is displayed without the accompanying stack trace.

  • long The exception information is displayed with the accompanying stack trace.

  • disable The exception information is not displayed; the user must handle the exception.

The following code shows an example of the exception display configuration:

<context-param>    <param-name>crystal_exception_info</param-name>    <param-value>long</param-value>    <description> Options for displaying exception information.       If this parameter is not set, the default value is short.       It can be one of the following values: short, long, disable.    </description> </context-param>


The crystal_exception_info parameter is short by default. Modifying exception.css specifies the style and formatting of short messages.

Logging Exceptions

The option to turn exception logging either on or off can be set with the crystal_exception_log_file parameter. The exception information output to the log file will be in the long format regardless of the setting of the crystal_exception_info parameter. The following code shows an example of the exception logging configuration:

<context-param>    <param-name>crystal_exception_log_file</param-name>    <param-value>c:\temp\webreportingexception.log</param-valu>    <description>       Set this parameter to log the exception in long form       to the file specified.       The value is the full path of the log file.    </description> </context-param>


When setting the parameter to the desired path of the log file, by default, exceptions are not logged.




Crystal Reports XI(c) Official Guide
Crystal Reports XI Official Guide
ISBN: 0672329174
EAN: 2147483647
Year: N/A
Pages: 365

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net