Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadsh committed Dec 31, 2018
2 parents cfc54de + 55eb72f commit 333c786
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
15 changes: 15 additions & 0 deletions helpers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package shark

// PanicIfError panic exception if the given error is not nil
func PanicIfError(err error) {
if err != nil {
panic(err.Error())
}
}

// PanicIfErrCustomMsg panic with custom message if given error is not nil
func PanicIfErrorWithMessage(err error, message string) {
if err != nil {
panic(message)
}
}
2 changes: 1 addition & 1 deletion renderer.go → middleware/renderer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shark
package middleware

import (
"fmt"
Expand Down
11 changes: 1 addition & 10 deletions sentry.go → middleware/reporter.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package shark
package middleware

import (
"errors"
Expand Down Expand Up @@ -90,12 +90,3 @@ func getRequestLogs(context context.Context) string {
// the date should be logged by iris' Logger, so we skip them
return fmt.Sprintf("%v %s %s %s", status, path, method, ip)
}

func CaptureRoutineException(exceptions exceptions.AggregatedRoutineException) {
// packet := raven.NewPacket(
// errString,
// raven.NewException(errors.New(errString), raven.NewStacktrace(2, 3, nil)),
// )
//
// raven.Capture(packet, getCaptureTags(exception))
}

0 comments on commit 333c786

Please sign in to comment.