Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
In VFP can i use On error goto Errorhandler like VB
Message
From
20/05/2003 10:20:28
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
In VFP can i use On error goto Errorhandler like VB
Miscellaneous
Thread ID:
00790450
Message ID:
00790450
Views:
58
Can i use like VB on error goto mapierror in VFP
The following Please:
********************Start******************
On Error GoTo mapiError

WAIT WINDOW NOWAIT "Please wait ... Logging Into Mail" NOCLEAR

WITH thisformset.basicform1
PUBLIC array ErrorArray(1)
&&PUBLIC mapierror
local lcCRLF
* Define constant
*#DEFINE CRLF CHR(13) + CHR(10)
*or define variable
lcCRLF = CHR(13) + CHR(10)

IF NOT .oleSession.SessionID > 0
.oleSession.Signon
ENDIF

* If the session ID is not valid, do not allow the form to load
IF .oleSession.SessionID > 0
WAIT clear
.oleMessage.SessionID = .oleSession.SessionID
* Start a new message
mRev_Com = sub_revw.comment
.oleMessage.Compose
.oleMessage.RecipIndex = 0
.oleMessage.AddressResolveUI = .T.
.oleMessage.RecipDisplayName = ALLTRIM(sub_revw.reviewer)
.oleMessage.ResolveName
ELSE
WAIT WINDOW "Form Cannot Load: Login Failed"
ENDIF
mapiError:
aError(ErrorArray)
IF ErrorArray(1,1) = 1429 && mapi error
MapiError = ErrorArray(1,6)
ELSE
MESSAGEBOX("ERROR HAS OCCURED "+ MESSAGE())
ENDIF
RETURN

*************************END****************************
Next
Reply
Map
View

Click here to load this message in the networking platform