Steve Endow looks at his pain in Catching Unhandled Exceptions in .NET
Catching Unhandled Exceptions in .NET
Archived post from 2010. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.