Permalink
Browse files

readme

  • Loading branch information...
tobi committed May 8, 2012
1 parent d8e4139 commit a8d4a4a9315a6dcf5a84f095a69045c3bd163cc7
Showing with 17 additions and 0 deletions.
  1. +17 −0 README
View
17 README
@@ -9,3 +9,20 @@ 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
+
+ }

0 comments on commit a8d4a4a

Please sign in to comment.