Documentation
¶
Index ¶
- type Error
- func (x *Error) Error() string
- func (x *Error) Format(state fmt.State, verb rune)
- func (x *Error) MarshalJSON() ([]byte, error)
- func (x *Error) StackTrace() StackTrace
- func (x *Error) UnmarshalJSON(b []byte) error
- func (x *Error) Unwrap() error
- func (x *Error) Values() map[string]interface{}
- func (x *Error) With(key string, value interface{}) *Error
- type StackFrame
- type StackTrace
- type StringError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error is an error interface with associated attributes.
func (*Error) Format ¶
Format returns: - %v, %s, %q: formated message - %+v: formated message with values and stack trace
func (*Error) MarshalJSON ¶
MarshallJSON returns a JSON string of errs.Error. However, because the Cause is embedded in the Message, the type information is lost.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON recovers Error objects from JSON strings. However, nested error structures are not restored.
type StackFrame ¶
type StackTrace ¶
type StackTrace []StackFrame
type StringError ¶
type StringError string
StringErrorは指定された文字列をエラーメッセージとして扱います.
func (StringError) New ¶
func (s StringError) New() *Error
New creates *errs.Error that wraps StringError.
func (StringError) Wrap ¶
func (s StringError) Wrap(cause error) *Error
Wrap creates *errs.Error that wraps StringError and cause.
Click to show internal directories.
Click to hide internal directories.