Error Handling in Plug-ins
[Applies to: Microsoft Dynamics CRM 4.0]
The Microsoft Dynamics CRM platform handles exceptions thrown in plug-ins by either displaying a standard error message or custom error message in the Microsoft Dynamics CRM Web application user interface. The exception message (System.Exception.Message) is also written to the Application event log on the server that runs the plug-in. The event log can be viewed by using the Event Viewer in Microsoft Windows.
To display a custom error message, your plug-in should throw an InvalidPluginExecutionException with the custom message as the Message property value.
© 2010 Microsoft Corporation. All rights reserved.