I'm using Craig Boyd's excellent code to send email using EsSmtp (thank you
Craig). It is very clear but there is one area that confuses me slightly
concerning the THROW command.
The code is as follows (much abbreviated):
TRY
Set up parameters
Call Send Mail method
If Send Mail returns an error
do case
case errorno = nnn
THROW 'Some Error Message'
case etc
endcase
endif
CATCH TO loError
lcReturn = [Error: ] + STR(loError.ERRORNO) etc
FINALLY
Release object
ENDTRY
RETURN lcReturn
>From what I can see if there is an error in the TRY block the method will
return a string giving details of the error but I can't see where the
messages generated by the THROW command will be displayed, if at all. As I
understand it if the code executes perfectly but the mail is not sent,
perhaps because the mailbox is busy, there will not be any indication. From
my reading of 'What's New in VFP8' an Exception object will be created.
Should I be testing for this object? If so, how?
TIA
John Weller
01380 723235
07976 393631
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.