Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Go library to report errors to airbrake and compatible servers

branch: master

Merge pull request #5 from burke/master

Fix HTTP POST error handling and correct typos
latest commit 82b5fcb46f
Tobias Lütke authored
README
Config
======

set airbrake.Endpoint and airbrake.ApiKey globals

Methods
=======

airbrake.Error(err) reports an error

airbrake.RequestError(err, *http.Request) can be used to add more context if you are in a http context


You can also automatically have this library report panics, use this method:

airbrake.CapturePanic(*http.Request)


example:

  func serve(w http.ResponseWriter, r *http.Request) {
      defer airbrake.CapturePanic(r)
      
      [...]

      panic("Oh no :-(") // will be recorded by airbrake 

  }
Something went wrong with that request. Please try again.