Jump to content

How to Handle Error on FF.au3 like IE.au3?


Recommended Posts

Hi, everyone.

I want to handle error in Firefox like in IE.

This is my code.

_IEErrorHandlerRegister(_ErrFunc)

Func _ErrFunc($oError)
    ; Do anything here.
    $sRead = IniRead("error.ini", "Email", "Sent", "Default")
    $24time = _NowTime(5)

    ; Read the error.InI set error = 1 if error is caught

        $ErrorMessage = (@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _
            @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _
            @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _
            @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _
            @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _
            @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
            @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
            @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
            @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
            @TAB & "Current Time is: " & @TAB & $24time & @CRLF & _
            @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF)

    ;   LogError($ErrorMessage)
        If $sRead = 0 Then
            Call("Alert", "error ", $ErrorMessage)
            IniWrite ("error.ini", "Email", "Sent", 1)
        EndIf
        LogError("An Error happened, error event triggered")
EndFunc   ;==>_ErrFunc

How can I change to FF.au3?

Thanks.

Edited by bagas9425
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...