MicroStrategy ONE

Error Handling

MicroStrategy Web products implement a number of error-handling routines in the event that errors or exceptions are thrown. Before reading this section in depth, become familiar with the concepts discussed in the following sections:

Every <page> in the Page Configuration file that inherits the default <page-sections> also inherits a section called <error> whose corresponding file is Generic_Error (JSP or ASP .NET file). The code in this file uses MicroStrategy custom tags to determine whether an error is present and, if so, to print the message associated with that error to the screen and to print the stack trace of the error to the HTML source of the page. Other <pages> often have more specific or elaborate error-handling routines. To determine the file used to error-handle a particular <page>, consult that <page> in the Page Configuration file.

To break down in more detail how these actions are performed, see the code in the error file in conjunction with the MicroStrategy Custom Tags Reference.

Exceptions can be thrown at a number of different points in the execution cycle, and it is possible for any number of different MicroStrategy Web components to receive the error. The error handling behavior is defined in different places for errors that happen at different times during the execution cycle. These places and times include:

  • Servlet or ASP.NET file: If the servlet or ASP.NET file catches an exception, it looks for a page whose name is error and uses the rules of that page to render HTML to the screen. By default, the error page points to a template file named Error_Template (JSP or ASP.NET file) that contains code to render the stack trace of the error in the HTML.  

  • Event handling process: If an exception is caught during the event handling process, the default action is for an error message to be sent to the screen while the stack trace is sent to the HTML source. This default action is defined by the default template file and in the <page-section> whose name is <error>, whether it is inherited from the default page or local to a specific page executing an event-based request.  

  • Data rendering by a transform: Every transform shipped with the MicroStrategy Web application inherits a private method called displayError(). If an exception is caught during data rendering by a transform, the displayError() method triggers the error's stack trace to be sent to the HTML. (It may also force debug information to be rendered to the HTML. Learn more about debugging parameters in the Debugging using transform parameters section.)

The objective of error handling is that, by default, when an error occurs the stack trace in the HTML source provides insight into the error.

See also