• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pace / bricks / 13717956986

06 Mar 2025 02:30PM UTC coverage: 51.823% (-4.8%) from 56.612%
13717956986

push

github

web-flow
Merge pull request #406 from pace/gomod-update

This updates all dependencies to the latest version, excluding

github.com/bsm/redislock
github.com/dave/jennifer

as newer versions lead to unwanted behavior.

54 of 82 new or added lines in 9 files covered. (65.85%)

453 existing lines in 15 files now uncovered.

4889 of 9434 relevant lines covered (51.82%)

20.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/maintenance/errors/raven/exception.go
1
package raven
2

3
import (
4
        "reflect"
5
        "regexp"
6
)
7

8
var errorMsgPattern = regexp.MustCompile(`\A(\w+): (.+)\z`)
9

UNCOV
10
func NewException(err error, stacktrace *Stacktrace) *Exception {
×
UNCOV
11
        msg := err.Error()
×
UNCOV
12
        ex := &Exception{
×
UNCOV
13
                Stacktrace: stacktrace,
×
UNCOV
14
                Value:      msg,
×
UNCOV
15
                Type:       reflect.TypeOf(err).String(),
×
UNCOV
16
        }
×
UNCOV
17
        if m := errorMsgPattern.FindStringSubmatch(msg); m != nil {
×
18
                ex.Module, ex.Value = m[1], m[2]
×
19
        }
×
UNCOV
20
        return ex
×
21
}
22

23
// https://docs.getsentry.com/hosted/clientdev/interfaces/#failure-interfaces
24
type Exception struct {
25
        // Required
26
        Value string `json:"value"`
27

28
        // Optional
29
        Type       string      `json:"type,omitempty"`
30
        Module     string      `json:"module,omitempty"`
31
        Stacktrace *Stacktrace `json:"stacktrace,omitempty"`
32
}
33

UNCOV
34
func (e *Exception) Class() string { return "exception" }
×
35

UNCOV
36
func (e *Exception) Culprit() string {
×
UNCOV
37
        if e.Stacktrace == nil {
×
38
                return ""
×
39
        }
×
UNCOV
40
        return e.Stacktrace.Culprit()
×
41
}
42

43
// Exceptions allows for chained errors
44
// https://docs.sentry.io/clientdev/interfaces/exception/
45
type Exceptions struct {
46
        // Required
47
        Values []*Exception `json:"values"`
48
}
49

50
func (es Exceptions) Class() string { return "exception" }
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc