Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorDetails ¶ added in v1.0.6
GetErrorDetails we obtain the values of an error detail separately, if the parameter is nil we return all empty values, and if the passed error parameter is not in the desired pattern, we return only the filled message and the rest empty.
func IsErrorDetail ¶
IsErrorDetail check if the error is an ErrorDetail containing the pattern with file name, line, function name and message
Types ¶
type ErrorDetail ¶ added in v1.0.9
type ErrorDetail struct {
// contains filtered or unexported fields
}
func New ¶
func New(message ...any) *ErrorDetail
New error with space separated message values, if the message parameter is empty we return a nil value, otherwise returns normal value
func NewSkipCaller ¶
func NewSkipCaller(skipCaller int, message ...any) *ErrorDetail
NewSkipCaller error with message values separate per space and skipCaller, if the message parameter is empty we return a nil value, otherwise returns normal value
func (*ErrorDetail) Error ¶ added in v1.0.9
func (e *ErrorDetail) Error() string
Error print the error as a string, genetic implementation of error in go
func (*ErrorDetail) GetDebugStack ¶ added in v1.0.9
func (e *ErrorDetail) GetDebugStack() string
GetDebugStack returns the value of the error debugStack field
func (*ErrorDetail) GetFile ¶ added in v1.0.9
func (e *ErrorDetail) GetFile() string
GetFile returns the value of the error file field
func (*ErrorDetail) GetFuncName ¶ added in v1.0.9
func (e *ErrorDetail) GetFuncName() string
GetFuncName returns the value of the error funcName field
func (*ErrorDetail) GetLine ¶ added in v1.0.9
func (e *ErrorDetail) GetLine() int
GetLine returns the value of the error line field
func (*ErrorDetail) GetMessage ¶ added in v1.0.9
func (e *ErrorDetail) GetMessage() string
GetMessage returns the value of the error message field
func (*ErrorDetail) PrintStack ¶ added in v1.0.9
func (e *ErrorDetail) PrintStack()
PrintStack print red message with detail error and debug stack