.NET error reporting library for Airbrake and compatible services like Codebase exceptions
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 2 commits behind atech:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



This is a .NET library which allows you to report exceptions using the Airbrake API. aTech Media uses this to report errors to projects in Codebase.

Once included in a project, a call to report an exception can be placed in any "Catch" block or used as a global error reporting tool.


Include the 'airbrake' project in your solution and add a reference to it. Alternatively, compile it then include and reference the DLL.

Next include the namespace in the file in which you are handling your exceptions:


using airbrake;


Imports airbrake


To use airbrake-dotnet, you will need an API key and some information about the endpoint.

###Step 1 - Initialisation

The initialiser for the class takes the following parameters:

  • bool ssl - Should connections to the endpoint use HTTPS?
  • string host - The hostname of the endpoint
  • string path - Path to the Airbrake API
  • string apikey - The API key for your applications
  • string environment - An environment name to identify this application/environment

If you are reporting exceptions to Codebase, you might initialise the library with the following code:

ExceptionHandler handler = new ExceptionHandler(true, "exceptions.codebasehq.com", "/notifier_api/v2/notices", "MY-API-KEY", "WindowsProduction");

###Step 2 - Reporting errors

Now that the error handler is ready to use, you can report errors like so:


##Full Example

public bool doSomething()
        //My risky code here
        return true;
    catch (Exception ex)
        ExceptionHandler handler = new ExceptionHandler(true, "exceptions.codebasehq.com", "/notifier_api/v2/notices", "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "WindowsProduction");
        return false;