Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Mapimail.vcx
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00477327
Message ID:
00496731
Vues:
53
Nigel,

I can not download files from your site. Each time, I hit on Downloads, I got 404 error. Could somebody else confirm, is it a problem there?

>Hi Nigel,
>
>Which update are you referring to? The class which is in Download section here has Last update: September 23, 1999 17:04
>
>Where is the last version of your class?
>
>How are you in general? Hopefully, everything is well.
>
>Best wishes and thanks again for the class.
>
>>Nadya & Marcia,
>>
>>Sorry for the long time to respond:
>>
>>Nadya: You may have an old version of the class - I changed it last October/November to handle specific errors.
>>
>>Marcia: As I say above, it does handle errors (I forgot that I'd changed it). It handles them in the same way that you suggest here.
>>
>>Sorry for the confusion - my mind has been a mess lately.
>>
>>>Marcia,
>>>
>>>Thanks for the code. I also think, it's a class responsibility to deal with related errors.
>>>
>>>>Hi Nigel.
>>>>
>>>>Long time no see! How's by you?
>>>>
>>>>>> Preventing errors in the class will infringe on higher level error handlers. <<
>>>>
>>>>Sorry, but I really have to disagree with you here. If errors occur while getting or sending e-mail, it is the class's responsibily to deal with them if it can.
>>>>
>>>>That can mean a number of different things. It may mean passing it up to the object it is sitting on or it may mean just adding it to an interenal error collection that can be accessed the object that is using its services like so:
>>>>
>>>>This code in the error method:
>>>>
>>>>*** log the error
>>>>This.LogError( nError, MESSAGE(), cMethod, MESSAGE(1), 2 )
>>>>
>>>>This code in LogErrors:
>>>>
>>>>
>>>>LOCAL lnErrCnt
>>>>WITH This
>>>>    *** How many Errors currently?
>>>>    lnErrCnt = ALEN( .AErrors, 1 )
>>>>    *** If only one row, is it actually an error?
>>>>    IF lnErrCnt = 1 AND EMPTY( .Aerrors[ 1, 1 ] )
>>>>        *** Nope - set error count = 1
>>>>        lnErrCnt = 1
>>>>    ELSE
>>>>        *** We already have at least one error,
>>>>        *** so increment the counter
>>>>        lnErrCnt = lnErrCnt + 1
>>>>    ENDIF
>>>>    *** Re-Dimension the Collection
>>>>    DIMENSION .AErrors[ lnErrCnt, 5 ]
>>>>    *** And Populate the current row
>>>>    .AErrors[ lnErrCnt, 1 ] = tnErrNum
>>>>    .AErrors[ lnErrCnt, 2 ] = IIF( EMPTY( tcErrMsg) , "", ALLTRIM( tcErrMsg ) )
>>>>    .AErrors[ lnErrCnt, 3 ] = IIF( EMPTY( tcMethod) , "", ALLTRIM( tcMethod ) )
>>>>    .AErrors[ lnErrCnt, 4 ] = IIF( EMPTY( tnLineNum) , "", ALLTRIM( PADL( tnLineNum, 100 )) )
>>>>    .AErrors[ lnErrCnt, 5 ] = IIF( EMPTY( tnSeverity) , "", ALLTRIM( PADL( tnSeverity, 100 )) )
>>>>ENDWITH
>>>>*** Just Return Success!
>>>>RETURN .T.
>>>>
>>>>
>>>>In order to see why a method of the MAPI class failed, the caller would merely call the class's GetErors method and take appropriate action. Code like this in GetErrors:
>>>>
>>>>
>>>>LOCAL lnErrCnt, loParamObj, lcErrName, lcErrDets, lnCnt
>>>>
>>>>*** Create the parameter object
>>>>loParamObj = CREATEOBJECT( 'relation' )
>>>>
>>>>*** Check if we have any errors
>>>>lnErrCnt = ALEN( This.AErrors, 1 )
>>>>IF lnErrCnt = 1 AND EMPTY( This.AErrors[1,1] )
>>>>    *** No Errors Pending
>>>>    loParamObj.AddProperty( 'nErrorCount', 0 )
>>>>ELSE
>>>>    *** Populate the Parameter Object here
>>>>	WITH loParamObj
>>>>        .AddProperty( 'nErrorCount', lnErrCnt )
>>>>        .AddProperty( 'aErrors[1]', "" )
>>>>        *** Now Get the 5 Logged Details
>>>>        FOR lnCnt = 1 TO lnErrCnt
>>>>            *** Add a row to the error array
>>>>            DIMENSION .aErrors[lnCnt, 5]
>>>>            *** Log the error as Character Strings
>>>>            .aErrors[lnCnt, 1] = TRANSFORM( This.AErrors[ lnCnt , 1] )    && Error Number
>>>>            .aErrors[lnCnt, 2] = TRANSFORM( This.AErrors[ lnCnt , 2] )    && Error Message
>>>>            .aErrors[lnCnt, 3] = TRANSFORM( This.AErrors[ lnCnt , 3] )    && Prog/Method
>>>>            .aErrors[lnCnt, 4] = TRANSFORM( This.AErrors[ lnCnt , 4] )    && Code Line
>>>>            .aErrors[lnCnt, 5] = TRANSFORM( This.AErrors[ lnCnt , 5] )    && Severity
>>>>	    NEXT
>>>>    ENDWITH
>>>>ENDIF
>>>>*** Clear the Error Collection
>>>>DIMENSION This.AErrors[1,5]
>>>>This.AErrors = ""
>>>>*** Return Errors
>>>>RETURN loParamObj
>>>>
>>>>
>>>>I don't think that code like this woould interefere with anything < s >.
>>>>
>>>>Marcia
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform