Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExitWithMessage ¶
func ExitWithMessage(message string)
ExitWithMessage print and write the stacktrace on the logs
func StatefulCause ¶
StatefulCause attempts to find the cause of the error that has a state associated, if it finds it returns it, otherwise returns the cause itself
Types ¶
type StatefulErrorMessage ¶
type StatefulErrorMessage struct {
Code int
Message string
Format string `default:"%d: %s"`
Separator string `default:": "`
}
StatefulErrorMessage groups an error code with a message
func NewStatefulErrorMessage ¶
func NewStatefulErrorMessage(code int, msg string) *StatefulErrorMessage
NewStatefulErrorMessage return a StatefulErrorMessage
func NewStatefulErrorMessageFromString ¶
func NewStatefulErrorMessageFromString(str string) *StatefulErrorMessage
NewStatefulErrorMessageFromString create a StatefulErrorMessage from string
func (StatefulErrorMessage) String ¶
func (s StatefulErrorMessage) String() string
String converts a stateful error message to string
Click to show internal directories.
Click to hide internal directories.