JobDocumentError event
This event is only fired when you use an external invoice source, and it can only exist inside the JobDocumentRetrieve event loop. After the JobDocumentRetrieve event handler is completely executed, this event cannot be fired again for that particular invoice. However, it can be fired again after a new JobDocumentRetrieve occurs.
The event passes information about the error codes that caused the error to occur. It is the plug-in's responsibility to filter out relevant errors for custom handling.
Due to the event architecture of ReadSoft Invoices, this event can be fired while executing an existing event handler. In other words, it is a nested event. After the event handler for JobDocumentError has terminated, the execution will continue in the remainder of the JobDocumentRetrieve event handler. The event is fired even if a try/catch (or On Error or similar) encloses some code in the JobDocumentRetrieve event handler.
[Settings]
AllowErrorHandlerEventHook=1
If this setting is not present or has a zero value, processing is executed according to the older ReadSoft Invoices behavior.
Syntax
Int32 OnJobDocumentError(Object currentInvoice, Object currentJob, int eC1, int eC2, int eC3, int eC4) As Long
Parameters
currentInvoice |
The invoice |
currentJob |
The job |
eC1, eC2, eC3, eC4 |
The four error codes |
Active objects
Return values
evtOK |
Interpret continues to process the invoice. If some pages cannot be added in the JobDocumentRetrieve event, these are ignored |
evtOKAbort |
The erroneous invoice is cleared and skipped, and a new, fresh JobDocumentRetrieve event is fired. |
evtError |
The job terminates. |