Last active
August 29, 2015 13:57
Revisions
-
shalakhin revised this gist
Mar 9, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,7 @@ func trace() *raven.Stacktrace { // HandleError handles error like logging, mail notification. func HandleError(err error) { packet := &raven.Packet{Message: err.Error(), Interfaces: []raven.Interface{raven.NewException(err, trace())}} // here we use Sentry instance created once in config instead of instantiating it every time config.Config.Sentry.Client.Capture(packet, nil) } -
shalakhin revised this gist
Mar 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // trace generates raven traceback func trace() *raven.Stacktrace { return raven.NewStacktrace(0, 3, []string{"myproject"}) } // HandleError handles error like logging, mail notification. -
shalakhin renamed this gist
Mar 9, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
shalakhin created this gist
Mar 9, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ // trace generates raven traceback func trace() *raven.Stacktrace { return raven.NewStacktrace(0, 3, []string{"kartoonart-backend"}) } // HandleError handles error like logging, mail notification. func HandleError(err error) { traceback := make([]byte, 8000) runtime.Stack(traceback, true) packet := &raven.Packet{Message: err.Error(), Interfaces: []raven.Interface{raven.NewException(err, trace())}} config.Config.Sentry.Client.Capture(packet, nil) }