Mstr Sdk Error Handling

mstr-sdk

How can we add our own error message?

  1. Launch the Web Customization Editor
  2. Switch to the MicroStrategy perspective
  3. Add all the necessary messages to the appropriate message bundle:
    1. Expand MicroStrategy Web Configuration -> Property Files -> resources
    2. Double-click on MessageBundle_en_US.properties file
    3. Provide the ID for the message and click the Add button. The ID is added to the list but the message is empty.
    4. Click on the empty message next to the ID, and type your message.
    5. Click the Save button at the top.
  4. Add your own error code:
    1. Expand MicroStrategy Web Configuration -> Error List
    2. Double-click on Errors
    3. Click on the Add button
    4. Provide your own error code (this should be a number) and click OK. Your error code is added to the list.
    5. Click on your error code.
    6. Provide the ID and default description for the title if necessary.
    7. Provide the ID and default description for the message if necessary.
    8. Click on the Save button at the top.

In our SDK code, we need to throw the Exception:

throw new WebAppRuntimeException("", 10000);

How can we customize an existing error message?

This depends exactly on what we want to do. Sometimes, it is enough to just edit the message bundle file:

  1. Launch the Web Customization Editor
  2. Switch to the MicroStrategy perspective
  3. Expand MicroStrategy Web Configuration -> Property Files -> resources
  4. Double-click on MessageBundle_en_US.properties file
  5. Find the message that we want to change and change it.
  6. Click the Save button at the top.

Other times, we may have to do something like this:

  1. Launch the Web Customization Editor
  2. Switch to the MicroStrategy perspective
  3. Expand MicroStrategy Web Configuration -> Error List
  4. Double-click on Errors
  5. Find the particular error that we want to change and change it
  6. Click on the Save button at the top.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License