PR-Tracker 6.0 Help
How to Add Exception Handling Code To Applications

Glossary Item Box

PR-Tracker is designed to collect exception data from dot net applications. In order to collect the exception data you must add exception handling code to your applications that make calls to ExManager class methods. To use ExManager you must add Prtracker.ExceptionManagement.dll as a reference in your project and use the Prtracker6 namespace. You can find Prtracker.ExceptionManagement.dll under Program Files in the folder where PR-Tracker is installed. Below is sample C# code illustrating how to use ExManager. This code snippet was taken from a Visual Studio project which you may download from

using Prtracker6;

namespace ExceptionsDemo


    static class Program



        static void Main()


            //Initialize ExManager

            ExManager.ExceptionLoggerAsmx =


            ExManager.PrtrackerProjectFolder= "Exceptions Demo";

            //Change the above settings to match your situation


            //Record some information that will be recorded in the Error Data

          ExManager.AddEvent("Starting ExceptionsDemo");

            ExManager.AddConfigurationValue("Windows Version", ExManager.GetWindowsVersion());


            //Example program code





                Application.Run(new Form1());



            //Handle all exceptions not handled at lower levels here

          catch (Exception ex)


                 //Display an error dialog that gives the user option to send the exception data