Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Document$ is a string value to be returned by this function as result (could be an error message)
  • Error$ is the error string which will raise an error that gracefully terminates the session if the value is not PENDING and Error$ is not "NullString". This string only controls the error trapping (and can be different from Document$)
  • Caption$ is the title/description of the error that is raised
  •  Mode is an optional parameter to influence the type of buttons presented with the dialog<

...

  1. The INCASE function is a convenient function to use in combination with the ERROR$ function. The INCASE can be used to define Error$, either to be "NullString" or have a message depending on another value or parameter.
  2. Mode's 2 or 4 will be the most useful options because these buttons most clearly provide a indication of what will happen.

...

If the result of ProgX_calculation#.ProgX_Errors$ is different from "No errors...", a message box is shown with the error string and with the caption "Error running ProgX". Depending on the type of buttons specified in the dialog by means of the Mode parameter, the session can be either immediately be terminated, or you can decide to let Quaestor attempt to continue the session.

The syntax is as follows.

ProgX_Errors$ = ERROR$(ProgX_calculation#.ProgX_Errors$,INCASE(ProgX_calculation#.ProgX_Errors$ = "No errors...", THEN, "NullString", ELSE, ProgX_calculation#.ProgX_Errors$), "Error running ProgX", 4) + Qcrlf

...

DESP_error_flag$ = ERROR$(INCASE(GET$("Desp.err","NullString", Total_Desp$)="NullString", THEN,
                                                   "No errors occurred...", ELSE,
                                                    DESP_Errors$)
                                       ,INCASE(GET$("Desp.err","NullString", Total_Desp$)="NullString", THEN,
                                                    "NullString", ELSE,
                                                     GET$("Desp.err","NullString", Total_Desp$)+Qcrlf+Qcrlf+
                                                     "Please check your input. Do you want to continue?")
                                       ,"In the DESP calculation a fatal error has occurred (details shown below).",4)

...