harness-drone/vendor/github.com/tobi/airbrake-go
2015-09-29 18:21:17 -07:00
..
airbrake.go updated vendor files and paths 2015-09-29 18:21:17 -07:00
airbrake_test.go updated vendor files and paths 2015-09-29 18:21:17 -07:00
handler.go updated vendor files and paths 2015-09-29 18:21:17 -07:00
LICENSE updated vendor files and paths 2015-09-29 18:21:17 -07:00
README updated vendor files and paths 2015-09-29 18:21:17 -07:00

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 

  }