@database ErrorManagement.guide
@remark ENGLISH VERSION
@author Eddie Churchill
@(c) "Copyright © 1993 Inovatronics, Inc."
@$VER: ErrorManagement.guide 2.5 (06/01/93)
@wordwrap
@font topaz.font 8
@index "CanDo_LexiconIndex"

@node "CanDo_Error Management_Index" "Error Management Commands, Functions and Variables"
@toc "CanDo_LexiconMain"
@{fg highlight}Available Topics...@{fg text}

  Command  @{" DoOnError                      " link "CanDo_DoOnError"}
  Variable @{" =ErrorCode                     " link "CanDo_ErrorCode"}
  Variable @{" =ErrorLineNumber               " link "CanDo_ErrorLineNumber"}
  Variable @{" =ErrorObjectName               " link "CanDo_ErrorObjectName"}
  Variable @{" =ErrorObjectType               " link "CanDo_ErrorObjectType"}
  Variable @{" =Errors                        " link "CanDo_Errors"}
  Variable @{" =ErrorScriptName               " link "CanDo_ErrorScriptName"}
  Variable @{" =ErrorScriptType               " link "CanDo_ErrorScriptType"}
  Variable @{" =ErrorSourceLine               " link "CanDo_ErrorSourceLine"}
  Variable @{" =ErrorText                     " link "CanDo_ErrorText"}
  Command  @{" IfError                        " link "CanDo_IfError"}

@endnode

@node "CanDo_doonerror" "DoOnError {RoutineName} [{Arg1} [,up to ten arguments]]"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  DoOnError {RoutineName} [{Arg1} [,up to ten arguments]]

@{fg highlight}Description...@{fg text}

  Performs the specified Routine if an error occurs in the script being
performed.  This will supersede the error handling done by CanDo.

@endnode

@node "CanDo_errorcode" "Let {Integer}=ErrorCode"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {Integer}=ErrorCode

@{fg highlight}Description...@{fg text}

  Returns the Error Number associated with an error.  See the manual for a
full description of this system variable.
  
  SEE ALSO: @{" ErrorText " link "CanDo_ErrorText"}.

@endnode

@node "CanDo_errorlinenumber" "Let {Integer}=ErrorLineNumber"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {Integer}=ErrorLineNumber

@{fg highlight}Description...@{fg text}

  The line number in the script which caused an error.

@endnode

@node "CanDo_errorobjectname" "Let {String}=ErrorObjectName"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorObjectName

@{fg highlight}Description...@{fg text}

  Returns the name of the object which had the error.

@endnode

@node "CanDo_errorobjecttype" "Let {String}=ErrorObjectType"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorObjectType

@{fg highlight}Description...@{fg text}

  Returns the type of object in which the error occurred.

@endnode

@node "CanDo_errors" "Let {Logical}=Errors"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {Logical}=Errors

@{fg highlight}Description...@{fg text}

  Returns @{" True " link "CanDo_True"} when script is executing after an error occurrence.

@endnode

@node "CanDo_errorscriptname" "Let {String}=ErrorScriptName"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorScriptName

@{fg highlight}Description...@{fg text}

  Returns the label for the script which had an error (ie., the name of the
routine)

@endnode

@node "CanDo_errorscripttype" "Let {String}=ErrorScriptType"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorScriptType

@{fg highlight}Description...@{fg text}

  Returns the script type where an error occurred.

@endnode

@node "CanDo_errorsourceline" "Let {String}=ErrorSourceLine"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorSourceLine

@{fg highlight}Description...@{fg text}

  Returns text of the script on which the error occurred.  This only works
when running from the CanDo.Library, not when run from DeckBrowser.

@endnode

@node "CanDo_errortext" "Let {String}=ErrorText"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  Let {String}=ErrorText

@{fg highlight}Description...@{fg text}

  Returns the error message for the error that occurred.
  
  SEE ALSO: @{" ErrorCode " link "CanDo_ErrorCode"}.

@endnode

@node "CanDo_iferror" "IfError"
@toc "CanDo_Error Management_Index"
@{fg highlight}Command...@{fg text}

  IfError

@{fg highlight}Description...@{fg text}

Used to detect an error following a scripting command.  If the previous
command caused an error, the IfError commands will execute.

@endnode

