• Error 0 on line 0 in function INITIALIZE:

    By John James 1 decade ago

    I've implemented OpenLog into my DB, set the Options, and included the reference in my agents as such…

    — Clip —


    Use "OpenLogFunctions"

    Option Public

    Option Explicit

    — End Clip —

    — Clip —

    Sub Initialize

    Set s = New NotesSession<br/>
    Set db = s.CurrentDatabase<br/>
        ... blah, blah, blah ...<br/>

    On Error Goto logError<br/>


    Call LogError<br/>

    End Sub

    — End Clip —

    I'm getting a report of "Error 0 on line 0 in function INITIALIZE:" in the OpenLog database… Nothing shows up in my Misc Errors log, and the agents are doing what they are supposed to do…

    • not a bug

      By Rob McDonagh 1 decade ago

      There's no error, but you are calling LogError every time through the agent. The last line before your error logging routing should be a redirection like "exit sub" or "goto end" with an appropriate "end" label after the error block. Basically, the way you've got the agent structured, the error block is always called. It should be skipped if there weren't any errors.