Please see
Sharepoint Fault Handler in vs 2008
Also below is a copy.
Fault Handler
To get more detailed information about this error, it is necessary to add a
Fault Activity (equivalent of a catch block) and to log it.
Select the workflow in the (Visual Studio) Workflow Designer, click
on the lower left side of the Designer and click on the Fault Handler:
Another view of the Workflow Designer will show up:
Drag and drop a
FaultHandler activity from the Workflow Foundation toolbox into
fautlHandlersActivity1 :
In the property page of this last activity select the FaultType property by browsing the mscrolib assembly:
Select System.Exception:
Now we will log the StackTrace into the workflow history log: drag and drop a LogHistoryList activity into the handler (if you don’t find this activity drag and drop the microsoft.Sharepoint.WorkflowAction.dll assembly to a new Visual Studio toolbox tab) :
Select the logToHistoryListActivity1 and set its HistoryOutcome property to the stack trace value of faultHandlerActivity1:
Rebuild the solution , redeploy (install.bat) and test the workflow.
The trace will show up in the workflow status :