Hi guys,
Please help!!!! I have a function that I am calling to automate processing of invoices. Most of the times this function works without issues but from time to time it hangs. i.e.
Here is the function:
public void ProcessInvoices()
{
bool rt = true;
try
{
rt = CaptureAllInvoices();
if (rt)
{
Write2ErrLog("------Email Invoices Started-" + DateTime.Now);
this.EmailInvoices();
Write2ErrLog("------Email Invoices Completed-" + DateTime.Now);
Write2ErrLog("------Email Single Invoices Started-" + DateTime.Now);
this.EmailSingleInvoices();
Write2ErrLog("------Email Single Invoices Completed-" + DateTime.Now);
Write2ErrLog("------Fax Invoices Started-" + DateTime.Now);
this.FaxInvoices(false);
Write2ErrLog("------Fax Invoices Completed-" + DateTime.Now);
}
}
catch (Exception ex)
{
Write2ErrLog("---------Error in Process invoices: " + ex.Message);
}
}
So it gets to this.EmailInvoices() and starts processing email but stops on the first one and doesn't move to the next function call.
Please advice on an approach I can take to troubleshoot this issue. I use try catch in all my functions but nothing is being caught.
Thanks in advance
Sam