KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q59977: Mac Hyp: Using HyperCard Global Variables for Error Checking

Article: Q59977
Product(s): Microsoft Mail For Appletalk Networks
Version(s): 2.0,3.0
Operating System(s): 
Keyword(s): 
Last Modified: 10-NOV-1999

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Mail Software Development Kit (SDK) for HyperCard, versions 2.0, 3.0 
-------------------------------------------------------------------------------

SUMMARY
=======

The Microsoft Mail Software Development Kit (SDK) for HyperCard uses two
HyperCard global variables to report the results of the msmail external function
call. These variables are as follows:

  mailResult
  mailResultText

The HyperCard global mailResult holds a number that is the return code of the
last call made to msmail. This is zero if the call succeeded. If an error
occurred, the HyperCard global mailResultText contains a textual description of
the error. If no error has occurred, mailResultText contains "No Error."

Global variables are used by declaring them as globals in the script with the
Global command. For example:

     on mouseup
        global mailResult, mailResultText
        put msmail(CreateMessage) into msref
        if mailresult <> 0 then
           answer "Error: " & mailResultText
           exit mouseup
        end if
        ....

If a call to the server is not successful, these functions are the only way to
find out that there has been an error. They are very useful in debugging and in
making a stack "bullet-proof" in operation.

This information is taken from the "Microsoft Mail HyperCard Interface
Documentation."

Additional query words:

======================================================================
Keywords          :  
Technology        : kbHWMAC kbOSMAC kbAudDeveloper kbMailSearch kbSDKSearch kbSDKMailHypercard200 kbSDKMailHypercard300
Version           : :2.0,3.0

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.