Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithoutStackTrace ¶
WithoutStackTrace removes the stacktrace from the error
Types ¶
type ErrorStruct ¶
type ErrorStruct struct {
Err error
Code int
Data interface{}
// contains filtered or unexported fields
}
func Errf ¶
func Errf(format string, v ...interface{}) ErrorStruct
Errf creates an error consisting of a text, formatted like fmt.Sprintf
func WrapError ¶
func WrapError(err error) ErrorStruct
WrapError wraps the error into an ErrorStruct with Stacktrace
func (ErrorStruct) WithData ¶
func (e ErrorStruct) WithData(data interface{}) ErrorStruct
WithData sets the data of the error
func (ErrorStruct) WithErrorCode ¶
func (e ErrorStruct) WithErrorCode(code int) ErrorStruct
WithErrorCode sets the errorcode
Click to show internal directories.
Click to hide internal directories.