Adding custom data to your Exceptions

You can now have your custom information transmitted up to Exceptioneer which may help you if you’re working on a system with lots of in process data you need to access at debug time.

All you need to do is add key value pairs to the Data object of your Exception (or Sub Exceptions).


            try 
            { 
                throw new System.NotImplementedException(); 
            }
            catch (Exception ex) 
            {

                //Add your Custom Data to the Exception
                ex.Data.Add("one", "one");
                ex.Data.Add("two", 2);
                ex.Data.Add("three", DateTime.Now);

                //Submit the Exception
                Exceptioneer.WebClient.Client C = new Exceptioneer.WebClient.Client(); 
                C.CurrentException = ex; 
                C.Submit(); 
            }

This will then be displayed along side your Stack trace information.

Adding custom data to your Exceptions Comments