I have a sharepoint designer workflow with many Log to history activities to know where the workflow is.

I also have 2 custom activities with some complex logic and try catch code.

I would like to put some code in he catch blocks that writes to the same workflow history list the details of the exception, because when an exception is thrown, sharepoint only shows error occurred.

Or any other options?


Use SPWorkflow.CreateHistoryEvent


Or (also) you can write detailed exception to the ULS logs. How to write to logs you can find, for example here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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