MicroStrategy ONE

Handling Execution Errors

Execution errors occur when an instruction is formed correctly but returns an unexpected result when it is executed. For example, attempting to delete a user who does not exist in the MicroStrategy metadata generates an execution error.

Command Manager recognizes two classes of execution errors:

  • Critical errors occur when the main part of the instruction is not able to complete. These errors interrupt script execution when the Stop script execution on error option is enabled (GUI) or when the -stoponerror flag is used (command line).

    For example, if you submit an instruction to create a user, user1, that already exists in the MicroStrategy metadata database, Command Manager cannot create the user. Because creating the user is the main part of the instruction, this is a critical error. If the Stop script execution on error option is enabled, the script stops executing and any further instructions are ignored.

  • Noncritical errors occur when the main part of the instruction is able to complete. These errors never interrupt script execution.

    For example, if you submit an instruction to create a MicroStrategy user group with two members, user1 and user2, but user2 does not exist in the MicroStrategy metadata database, Command Manager can still create the group. Because creating the group is the main part of the instruction (adding users is secondary), this is a noncritical error.

An error message is written to the Messages tab of the Script window for all execution errors, critical or noncritical. In addition, if logging is enabled in the Options dialog box, the error message is written to the log file.

Command Manager and Prompted Objects

Command Manager cannot manipulate prompted objects. For example, it cannot alter the properties of a metric that contains a prompt, and it cannot create subscriptions for a report that contains a prompt.

This restriction extends to prompts at any level of nesting. For example, if you have a custom group that contains a prompted metric, Command Manager cannot alter the properties of that custom group.

If you attempt to execute a statement that manipulates a prompted object, Command Manager returns a noncritical execution error.