• Bug/Correction for Java LogErrorEx

    By Rafez Noorullah 2 decades ago

    Within the Using this Database help document, under the section "Using the LogErrorEx function for advanced error logging", there are several changes that are required for the Java method.



    Firstly the Java method for calling LogErrorEx is not functionally identical to the LotusScript LogErrorEx, as it requires the passing of the Exception as the first parameter within the call.



    Secondly the Java example requires the addition of the Exception such that this becomes:



    private boolean updateDoc (Document doc, Integer appLevel) {

    try {<br/>
        doc.replaceItemValue(&quot;ApproverLevel&quot;, appLevel);<br/>
        doc.computeWithForm(true, true);<br/>
        doc.save(true, true);<br/>
        return true;<br/>
    } catch (Exception e) {<br/>
        oli.logErrorEx( e, &quot;ApproverLevel Update Failed&quot;, OpenLogItem.SEVERITY_HIGH, doc);<br/>
        return false;<br/>
    }<br/>
    

    }

    • Good catch. Thanks!

      By Julian Robichaux 2 decades ago

      Ah, good catch. I'll update the documentation in the next release (which should be soon, so I can move 1.5 from Beta to production status).



      Thanks!