> Le 2 févr. 2018 à 00:30, Timothy Penner <tpen...@4d.com> a écrit :
> 
> Arnaud,
> 
>> Most of the time I do this at beginning:
>> $cmn_t:=Current method name
>> then I use $cmn_t.
>> I don't remember of problems in compiled.
> 
> But do you use the current method to handle errors?
> Either: ON ERR CALL(Current method name)
> Or as you wrote:    ON ERR CALL($cmn_t)

Second option:

//IC_here -> bool
//true if 4D Internet Commands is available
C_BOOLEAN($0)
C_TEXT($1)

C_TEXT($nmc_t)
C_TEXT($oldErreur_t)
C_TEXT($error_t)

If (False)
        C_BOOLEAN(IC_here ;$0)
        C_TEXT(IC_here ;$1)
End if
//_
$nmc_t:=Current method name
Case of
        : (Method called on error=$nmc_t)
        error_l:=error
Else
        error_l:=0
        ARRAY LONGINT($num_al;0x0000)
        ARRAY TEXT($nom_at;0x0000)
        PLUGIN LIST($num_al;$nom_at)
        If (Find in array($nom_at;"4D Internet Commands")>0)
                $oldErreur_t:=Method called on error
                ON ERR CALL($nmc_t)
                $error_t:=IT_ErrorText (0)  //test IC command
                $0:=(error_l=0)
                ON ERR CALL($oldErreur_t)
        End if
End case
//_

--
Arnaud de Montard 
(sorry, wrong address in previous)




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to