README ¶
Weird error
Yet another error management tool
Usage
package main
import (
"errors"
"gitlab.com/infiniteloopcloud/weird"
)
var ErrTest = errors.New("test error")
func main() {
err := weird.New("Message returned over HTTP", ErrTest, 402)
errors.Is(err, ErrTest)
// returns true
}
Documentation ¶
Overview ¶
Package weird is our internal error handling tool with proper protocol agnostic response definition
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct { // StatusCode is the final status code returned for http response writer StatusCode int // Error is the original error InnerError error // Msg is the final message returned for http response writer Msg string }
Error is the main error handling representation, the usage
Click to show internal directories.
Click to hide internal directories.