Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.13 KB

File metadata and controls

70 lines (50 loc) · 2.13 KB

Integration library WPF

VSTS NuGet

This library will detect all unhandled exceptions in WPF based applications and report them to the Coderr service (or your account at https://coderr.io).

For more information about Coderr, visit our homepage.

Installation

  1. Download and install the Coderr Community Server, use our feaure complete Coderr Premise Server, or use our Cloud Service (free up 1000 error reports / month).
  2. Install this client library (using nuget coderr.client.wpf)
  3. Configure the credentials from your Coderr account in your App.xaml.cs.
public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {

        // Coderr configuration
        var uri = new Uri("https://report.coderr.io/");
        Err.Configuration.Credentials(uri,
            "yourAppKey",
            "yourSharedSecret");

        // to catch unhandled exceptions
        Err.Configuration.CatchWpfExceptions();

        // different types of configuration options
        Err.Configuration.UserInteraction.AskUserForDetails = true;
        Err.Configuration.UserInteraction.AskUserForPermission = true;
        Err.Configuration.UserInteraction.AskForEmailAddress = true;


        base.OnStartup(e);
    }
}

Getting started

Simply catch an exception and report it:

public void UpdatePost(int uid, ForumPost post)
{
    try
    {
        _service.Update(uid, post);
    }
    catch (Exception ex)
    {
        Err.Report(ex, new{ UserId = uid, ForumPost = post });
    }
}

The context information will be attached as:

Read more...

More information