Click or drag to resize
IAnalyticsMonitorTrackException Method (Exception, String, Object)
Call to track an exception that occured in the application.

Namespace: EQATEC.Analytics.Monitor
Assembly: EQATEC.Analytics.Monitor (in EQATEC.Analytics.Monitor.dll) Version: 3.2.1.0 (3.2.1)
Syntax
void TrackException(
	Exception exception,
	string contextMessageFormat,
	params Object[] args
)

Parameters

exception
Type: SystemException
The exception to be tracked
contextMessageFormat
Type: SystemString
A context message string containing the information about the action being performed when the exception occurred
args
Type: SystemObject
An object array containing zero or more objects to format the contextMessageFormat
Examples
An example of tracking an exception
static class Program 
{   
  [STAThread]
  static void Main(string[] args)
  {
    IAnalyticsMonitor monitor = AnalyticsMonitorFactory.CreateMonitor("YOUR-PRODUCT_KEY");
    monitor.Start();
    try 
    {
       // your application logic here
    }
    catch(Exception exc)
    {
      // catch-all handle 
      monitor.TrackException(exc, "CatchAllHandler with argument count {0}", args.Length);
    }
    finally
    {
      monitor.Stop();
    }
  } 
}
See Also