Documentation
¶
Index ¶
- Variables
- func ErrorMessageToError(err error, msg string) error
- func ErrorsToString(errItems ...error) error
- func ErrorsToStringUsingJoiner(joiner string, errItems ...error) string
- func MessagesJoined(messages []string) string
- func SimpleReferencesCompile(errType errtype.Variation, references ...interface{}) string
- func SimpleReferencesCompileOptimized(errType errtype.Variation, references ...interface{}) string
- type StringFmtFunc
- type Wrapper
- func Empty() Wrapper
- func EmptyPrint() Wrapper
- func EmptyPtr() *Wrapper
- func ErrorsToWrapper(errType errtype.Variation, errItems ...error) *Wrapper
- func New(errType errtype.Variation) Wrapper
- func NewErrUsingAllParams(stackSkipIndex int, errType errtype.Variation, isDisplayableError bool, ...) Wrapper
- func NewErrUsingAllParamsPtr(stackSkipIndex int, errType errtype.Variation, isDisplayableError bool, ...) *Wrapper
- func NewError(stackSkipIndex int, err error) Wrapper
- func NewErrorPlusMsgUsingAllParamsPtr(stackSkipIndex int, errType errtype.Variation, isDisplayableError bool, ...) *Wrapper
- func NewErrorPtr(stackSkipIndex int, err error) *Wrapper
- func NewErrorRef1(stackSkipIndex int, errType errtype.Variation, err error, var1 string, ...) *Wrapper
- func NewFromDataModel(model *WrapperDataModel) *Wrapper
- func NewGeneric(stackSkipIndex int, error error) Wrapper
- func NewGenericPtr(stackSkipIndex int, error error) *Wrapper
- func NewMsgDisplayErrorPtr(stackSkipIndex int, errType errtype.Variation, message string, ...) *Wrapper
- func NewMsgDisplayErrorReferencesPtr(stackSkipIndex int, errType errtype.Variation, message string, ...) *Wrapper
- func NewMsgDisplayErrorUsingStackTracesPtr(errType errtype.Variation, message string, ...) *Wrapper
- func NewMsgUsingAllParams(stackSkipIndex int, errType errtype.Variation, isDisplayableError bool, ...) Wrapper
- func NewMsgUsingAllParamsPtr(stackSkipIndex int, errType errtype.Variation, isDisplayableError bool, ...) *Wrapper
- func NewMsgUsingCodeStacksPtr(errType errtype.Variation, isDisplayableError bool, message string, ...) *Wrapper
- func NewOnlyRefs(stackSkipIndex int, errType errtype.Variation, refValues ...ref.Value) *Wrapper
- func NewPath(stackSkipIndex int, errType errtype.Variation, error error, filePath string) *Wrapper
- func NewPathMessage(stackSkipIndex int, errType errtype.Variation, filePath string, ...) *Wrapper
- func NewPtr(errType errtype.Variation) *Wrapper
- func NewPtrUsingStackSkip(stackStartIndex int, errType errtype.Variation) *Wrapper
- func NewRef(stackSkipIndex int, errType errtype.Variation, err error, varName string, ...) *Wrapper
- func NewRef1(stackSkipIndex int, errType errtype.Variation, var1 string, val1 interface{}) *Wrapper
- func NewRef1Msg(stackSkipIndex int, errType errtype.Variation, msg string, var1 string, ...) *Wrapper
- func NewRef2(stackSkipIndex int, errType errtype.Variation, error error, varName string, ...) *Wrapper
- func NewRef2Msg(stackSkipIndex int, errType errtype.Variation, msg string, var1 string, ...) *Wrapper
- func NewRefWithMessage(stackSkipIndex int, errType errtype.Variation, message string, ...) *Wrapper
- func NewRefs(stackSkipIndex int, errType errtype.Variation, error error, ...) *Wrapper
- func NewUnknownUsingMessage(stackSkipIndex int, isDisplayableError bool, message string) Wrapper
- func NewUnknownUsingMessagePtr(stackSkipIndex int, isDisplayableError bool, message string) *Wrapper
- func NewUsingError(stackSkipIndex int, errType errtype.Variation, err error) Wrapper
- func NewUsingErrorAndMessage(stackSkipIndex int, err error, msg string) *Wrapper
- func NewUsingErrorPtr(stackSkipIndex int, errType errtype.Variation, err error) *Wrapper
- func NewUsingErrorPtrErrorInPtr(stackSkipIndex int, errType errtype.Variation, err *error) *Wrapper
- func NewUsingErrorWithoutTypeDisplay(errType errtype.Variation, err error) Wrapper
- func NewUsingErrorWithoutTypeDisplayPtr(errType errtype.Variation, err error) *Wrapper
- func NewUsingMessage(stackSkipIndex int, errType errtype.Variation, message string) Wrapper
- func NewUsingMessagePtr(stackSkipIndex int, errType errtype.Variation, message string) *Wrapper
- func NewUsingSeparator(stackSkipIndex int, errType errtype.Variation, joiner string, ...) Wrapper
- func NewUsingSeparatorPtr(stackSkipIndex int, errType errtype.Variation, joiner string, ...) *Wrapper
- func NewUsingTypeErrorAndMessage(stackSkipIndex int, errType errtype.Variation, err error, msg string) *Wrapper
- func NewUsingWrapper(stackSkipIndex int, currentWrapper *Wrapper, additionalReferences ...ref.Value) *Wrapper
- func TypeReferenceQuick(stackSkipIndex int, errType errtype.Variation, referencesValues ...interface{}) *Wrapper
- func (it *Wrapper) AsErrorWrapper() *Wrapper
- func (it *Wrapper) AsJsonContractsBinder() corejson.JsonContractsBinder
- func (it Wrapper) Clone() Wrapper
- func (it *Wrapper) ClonePtr() *Wrapper
- func (it *Wrapper) CompiledError() error
- func (it *Wrapper) CompiledErrorWithStackTraces() error
- func (it *Wrapper) ConcatNew(skipStackIndex int, err error) *Wrapper
- func (it *Wrapper) ConcatNewErrors(skipStackIndex int, errItems ...error) *Wrapper
- func (it *Wrapper) ConcatNewMessage(skipStackIndex int, errMsg string) *Wrapper
- func (it *Wrapper) ConcatNewMessageWithRef1(skipStackIndex int, errMsg string, var1 string, val1 interface{}) *Wrapper
- func (it *Wrapper) ConcatNewMessageWithRef2(skipStackIndex int, errMsg string, var1 string, val1 interface{}, var2 string, ...) *Wrapper
- func (it *Wrapper) ConcatNewMessageWithRefs(skipStackIndex int, errMsg string, references ...ref.Value) *Wrapper
- func (it *Wrapper) ConcatNewMessageWithRefsOnly(references ...ref.Value) *Wrapper
- func (it *Wrapper) ConcatNewMessages(skipStackIndex int, errMessages ...string) *Wrapper
- func (it *Wrapper) ConcatNewWrapperError(skipStackIndex int, another *Wrapper) *Wrapper
- func (it *Wrapper) ConcatWithNewStackSkip(skipStackIndex int) *Wrapper
- func (it *Wrapper) ConcatWithNewStackTraces(stackTraces ...codestack.Trace) *Wrapper
- func (it *Wrapper) Dispose()
- func (it *Wrapper) Error() error
- func (it *Wrapper) ErrorString() string
- func (it *Wrapper) FullOrErrorMessage(isErrorMessage bool) string
- func (it *Wrapper) FullString() string
- func (it *Wrapper) FullStringSplitByNewLine() []string
- func (it *Wrapper) FullStringWithLimitTraces(limit int) string
- func (it *Wrapper) FullStringWithTraces() string
- func (it *Wrapper) GetTypeVariantStruct() errtype.VariantStructure
- func (it *Wrapper) HandleError()
- func (it *Wrapper) HandleErrorWithMsg(newMessage string)
- func (it *Wrapper) HandleErrorWithRefs(newMessage string, refVar, refVal interface{})
- func (it *Wrapper) HasError() bool
- func (it *Wrapper) IsEmpty() bool
- func (it *Wrapper) IsEmptyError() bool
- func (it *Wrapper) IsEquals(another *Wrapper) bool
- func (it *Wrapper) IsErrorEquals(err error) bool
- func (it *Wrapper) IsErrorMessage(msg string, isCaseSensitive bool) bool
- func (it *Wrapper) IsErrorMessageContains(msg string, isCaseSensitive bool) bool
- func (it *Wrapper) IsErrorMessageEqual(msg string) bool
- func (it *Wrapper) IsFailed() bool
- func (it *Wrapper) IsReferencesEmpty() bool
- func (it *Wrapper) IsSuccess() bool
- func (it *Wrapper) IsTypeOf(errType errtype.Variation) bool
- func (it *Wrapper) IsValid() bool
- func (it Wrapper) Json() corejson.Result
- func (it *Wrapper) JsonModel() *WrapperDataModel
- func (it *Wrapper) JsonModelAny() interface{}
- func (it *Wrapper) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it Wrapper) JsonPtr() *corejson.Result
- func (it *Wrapper) Log()
- func (it *Wrapper) LogFatal()
- func (it *Wrapper) LogFatalWithTraces()
- func (it *Wrapper) LogWithTraces()
- func (it *Wrapper) MarshalJSON() ([]byte, error)
- func (it *Wrapper) ParseInjectUsingJson(jsonResult *corejson.Result) (*Wrapper, error)
- func (it *Wrapper) ParseInjectUsingJsonMust(jsonResult *corejson.Result) *Wrapper
- func (it *Wrapper) RawErrorTypeName() string
- func (it *Wrapper) References() *refs.Collection
- func (it *Wrapper) StackTraceString() string
- func (it *Wrapper) StackTracesLimit(limit int) *codestack.TraceCollection
- func (it *Wrapper) String() string
- func (it *Wrapper) Type() errtype.Variation
- func (it *Wrapper) TypeCodeNameString() string
- func (it *Wrapper) TypeName() string
- func (it *Wrapper) TypeNameCode() string
- func (it *Wrapper) TypeNameWithCustomMessage(customMessage string) string
- func (it *Wrapper) TypeString() string
- func (it *Wrapper) UnmarshalJSON(data []byte) error
- func (it *Wrapper) ValidationErrUsingTextValidator(validator *corevalidator.TextValidator, ...) *Wrapper
- func (it *Wrapper) Value() error
- type WrapperDataModel
Constants ¶
This section is empty.
Variables ¶
var ( StaticEmpty = Empty() StaticEmptyPtr = &StaticEmpty )
Functions ¶
func ErrorMessageToError ¶ added in v0.8.0
ErrorMessageToError final error is nil if err is nil
func ErrorsToString ¶ added in v0.8.0
ErrorsToString nil items will be ignored.
func ErrorsToStringUsingJoiner ¶ added in v0.8.0
ErrorsToStringUsingJoiner nil items will be ignored.
func MessagesJoined ¶ added in v0.7.8
func SimpleReferencesCompile ¶ added in v0.7.0
func SimpleReferencesCompileOptimized ¶ added in v0.7.0
func SimpleReferencesCompileOptimized( errType errtype.Variation, references ...interface{}, ) string
SimpleReferencesCompileOptimized
errconsts.SimpleReferenceCompileOptimizedFormat = `%typeName (..., "reference")`
Types ¶
type StringFmtFunc ¶ added in v0.7.9
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
func EmptyPrint ¶ added in v0.0.4
func EmptyPrint() Wrapper
func ErrorsToWrapper ¶ added in v0.8.0
ErrorsToWrapper nil items will be ignored.
func NewErrUsingAllParams ¶
func NewErrUsingAllParamsPtr ¶
func NewErrorPlusMsgUsingAllParamsPtr ¶ added in v0.0.2
func NewErrorPtr ¶ added in v0.1.9
func NewErrorRef1 ¶ added in v0.6.5
func NewErrorRef1( stackSkipIndex int, errType errtype.Variation, err error, var1 string, val1 interface{}, ) *Wrapper
NewErrorRef1 alias for NewRef
func NewFromDataModel ¶ added in v0.4.0
func NewFromDataModel( model *WrapperDataModel, ) *Wrapper
func NewGeneric ¶
func NewGenericPtr ¶ added in v0.3.9
func NewMsgDisplayErrorPtr ¶ added in v0.7.9
func NewMsgDisplayErrorReferencesPtr ¶ added in v0.8.3
func NewMsgDisplayErrorUsingStackTracesPtr ¶ added in v0.7.9
func NewMsgUsingAllParams ¶
func NewMsgUsingAllParamsPtr ¶
func NewMsgUsingCodeStacksPtr ¶ added in v0.7.9
func NewMsgUsingCodeStacksPtr( errType errtype.Variation, isDisplayableError bool, message string, codeStacks codestack.TraceCollection, references *refs.Collection, ) *Wrapper
func NewOnlyRefs ¶ added in v0.5.2
func NewPathMessage ¶ added in v0.5.2
func NewPtrUsingStackSkip ¶ added in v0.7.9
func NewRef1Msg ¶ added in v0.7.0
func NewRef2Msg ¶ added in v0.7.0
func NewRefWithMessage ¶ added in v0.5.2
func NewUnknownUsingMessage ¶
func NewUnknownUsingMessagePtr ¶ added in v0.3.9
func NewUsingError ¶
func NewUsingErrorAndMessage ¶ added in v0.4.7
func NewUsingErrorPtr ¶
func NewUsingErrorPtrErrorInPtr ¶ added in v0.1.9
func NewUsingErrorWithoutTypeDisplayPtr ¶ added in v0.3.9
func NewUsingMessage ¶
func NewUsingMessagePtr ¶ added in v0.1.9
func NewUsingSeparator ¶
func NewUsingSeparatorPtr ¶ added in v0.3.9
func NewUsingTypeErrorAndMessage ¶ added in v0.4.7
func NewUsingWrapper ¶ added in v0.5.4
func TypeReferenceQuick ¶ added in v0.7.0
func TypeReferenceQuick( stackSkipIndex int, errType errtype.Variation, referencesValues ...interface{}, ) *Wrapper
TypeReferenceQuick - errorTypeName - (...., items)...
func (*Wrapper) AsErrorWrapper ¶ added in v0.7.3
func (*Wrapper) AsJsonContractsBinder ¶ added in v0.4.9
func (it *Wrapper) AsJsonContractsBinder() corejson.JsonContractsBinder
func (*Wrapper) CompiledError ¶ added in v0.5.4
func (*Wrapper) CompiledErrorWithStackTraces ¶ added in v0.7.9
func (*Wrapper) ConcatNew ¶ added in v0.4.7
ConcatNew It will create new errorwrapper.Wrapper and combined error with consts.DefaultErrorLineSeparator
func (*Wrapper) ConcatNewErrors ¶ added in v0.4.7
ConcatNewErrors It will create new errorwrapper.Wrapper and combined errors with consts.DefaultErrorLineSeparator
func (*Wrapper) ConcatNewMessage ¶ added in v0.4.7
ConcatNewMessage It will create new errorwrapper.Wrapper and combined msg with consts.DefaultErrorLineSeparator
func (*Wrapper) ConcatNewMessageWithRef1 ¶ added in v0.5.4
func (*Wrapper) ConcatNewMessageWithRef2 ¶ added in v0.5.4
func (*Wrapper) ConcatNewMessageWithRefs ¶ added in v0.5.4
func (*Wrapper) ConcatNewMessageWithRefsOnly ¶ added in v0.5.4
func (*Wrapper) ConcatNewMessages ¶ added in v0.4.9
ConcatNewMessages It will create new errorwrapper.Wrapper and combined msg with consts.DefaultErrorLineSeparator
func (*Wrapper) ConcatNewWrapperError ¶ added in v0.4.7
ConcatNewWrapperError Warning : It will not take anything other than error message to combine with.
func (*Wrapper) ConcatWithNewStackSkip ¶ added in v0.8.6
func (*Wrapper) ConcatWithNewStackTraces ¶ added in v0.8.6
func (*Wrapper) ErrorString ¶
ErrorString if empty error then returns ""
func (*Wrapper) FullOrErrorMessage ¶ added in v0.7.1
func (*Wrapper) FullString ¶
func (*Wrapper) FullStringSplitByNewLine ¶ added in v0.7.1
func (*Wrapper) FullStringWithLimitTraces ¶ added in v0.7.9
func (*Wrapper) FullStringWithTraces ¶ added in v0.7.9
func (*Wrapper) GetTypeVariantStruct ¶
func (it *Wrapper) GetTypeVariantStruct() errtype.VariantStructure
func (*Wrapper) HandleError ¶
func (it *Wrapper) HandleError()
HandleError Only call panic if has currentError
func (*Wrapper) HandleErrorWithMsg ¶
HandleErrorWithMsg Only call panic if has currentError
func (*Wrapper) HandleErrorWithRefs ¶
func (*Wrapper) IsEmptyError ¶ added in v0.4.9
func (*Wrapper) IsErrorEquals ¶
func (*Wrapper) IsErrorMessage ¶
IsErrorMessage If error IsEmpty then returns false regardless
func (*Wrapper) IsErrorMessageContains ¶
IsErrorMessageContains If error IsEmpty then returns false regardless
func (*Wrapper) IsErrorMessageEqual ¶
func (*Wrapper) IsReferencesEmpty ¶ added in v0.0.4
func (*Wrapper) JsonModel ¶ added in v0.4.0
func (it *Wrapper) JsonModel() *WrapperDataModel
func (*Wrapper) JsonModelAny ¶ added in v0.4.0
func (it *Wrapper) JsonModelAny() interface{}
func (*Wrapper) JsonParseSelfInject ¶ added in v0.4.0
func (*Wrapper) LogFatalWithTraces ¶ added in v0.8.0
func (it *Wrapper) LogFatalWithTraces()
func (*Wrapper) LogWithTraces ¶ added in v0.8.0
func (it *Wrapper) LogWithTraces()
func (*Wrapper) MarshalJSON ¶ added in v0.4.0
func (*Wrapper) ParseInjectUsingJson ¶ added in v0.4.0
func (*Wrapper) ParseInjectUsingJsonMust ¶ added in v0.4.0
ParseInjectUsingJsonMust Panic if error
func (*Wrapper) RawErrorTypeName ¶ added in v0.8.3
func (*Wrapper) References ¶ added in v0.6.3
func (it *Wrapper) References() *refs.Collection
func (*Wrapper) StackTraceString ¶ added in v0.7.9
func (*Wrapper) StackTracesLimit ¶ added in v0.7.9
func (it *Wrapper) StackTracesLimit(limit int) *codestack.TraceCollection
func (*Wrapper) TypeCodeNameString ¶ added in v0.8.3
TypeCodeNameString
Format : errconsts.ErrorCodeWithTypeNameFormat
"(Code - #%d) : %s"
func (*Wrapper) TypeNameWithCustomMessage ¶ added in v0.8.3
TypeNameWithCustomMessage
errconsts.ErrorCodeHyphenTypeNameWithLineFormat = "(#%d - %s) %s"
func (*Wrapper) TypeString ¶
TypeString
Format : errconsts.VariantStructStringFormat
"%s (Code - %d) : %s" : "TypeName (Code - ValueInt) : Message from type string"
func (*Wrapper) UnmarshalJSON ¶ added in v0.4.0
func (*Wrapper) ValidationErrUsingTextValidator ¶ added in v0.7.1
func (it *Wrapper) ValidationErrUsingTextValidator( validator *corevalidator.TextValidator, params *corevalidator.ValidatorParamsBase, ) *Wrapper
type WrapperDataModel ¶ added in v0.4.0
type WrapperDataModel struct { IsDisplayableError bool CurrentError string ErrorType errtype.Variation StackTraces codestack.TraceCollection References *refs.Collection HasError bool }
func NewDataModel ¶ added in v0.4.0
func NewDataModel(wrapper *Wrapper) *WrapperDataModel