Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What is it that would cause no error message to be logged if the form fails to submit?

I have a form that has custom submit code written and at times fails on submit. It gives a correlation id which I give to my sharepoint server admin. Apparently nothing is getting written into the log file for that ID. After some google searching I could not find anyone else with a similar problem which leads me to beleive that how we handle exceptions is wrong. I don't know enough about coding with InfoPath to say for sure that it is done wrong but I am suspicous it is.

The catch block is where I think the problem is because of no error messages are shown.

catch (Exception ex)
{
    e.CancelableArgs.Message = ("There was a problem submitting the form:\n\n" + ex.Message);
    e.CancelableArgs.Cancel = true;
}

e is a SubmitEventArgs object that gets passed in. This is the last lines of code in this function so I don't know if it is supposed to be writing to the log or if that is handled by sharepoint itself if an event is cancelled. Because nothing is getting written to the log this would lead me to believe that this code is wrong. If it is can you either provide a link to example code that is correct or explain what needs to be done.

This is done with InfoPath 2007 and SharePoint 2010

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

It turns out that the error was getting logged it was found when the exact minute the error happened was known. So I'm saying it is operator error on not checking the right log files.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.