SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a workflow that converts a docx to pdf then does some more processing on the document.

I would like to kill/terminate/cancel the workflow if the conversion fails but I am not sure the best way to do this. Do I just throw an exception and let that kill the workflow? I would like to leave a useful message in the history other than "Error Occurred" that could help with debugging.

I have a couple other areas in the code where I would also like to be able to kill the workflow and leave a useful History message and outcome.

Is there a good way to do this?

share|improve this question

I actually try to handle the exception first and write some meaningful event log otherwise I let it bubble. Check out these links and decide a method most suitable for you -

MSDN Description of Workflow Fault Handling

Fault Handling in SharePoint Workflow

Example of error handling and writing event logs in SharePoint Workflow

share|improve this answer

Your Answer


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.