Esempio n. 1
0
func New(code int, err error) *Error {
	if err == nil {
		return nil
	}

	e := &Error{
		code:  code,
		err:   err,
		stack: rollbar.BuildStack(3),
		trace: errorTrace(),
	}

	return e
}
Esempio n. 2
0
// BuildStackWithSkip concatenates the stack given by the current execution flow
// and the stack determined by the errgo error
func BuildStackWithSkip(err error, skip int) rollbar.Stack {
	errStack := BuildStack(err)
	execStack := rollbar.BuildStack(skip + 2)
	return append(errStack, execStack...)
}