error_report

package
v0.0.0-...-a8787bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 0 Imported by: 1

Documentation

Overview

error_report provides interfaces, structs, and functions for working with error reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorReport_interface

type ErrorReport_interface interface {
	NoError() bool
	IsError() bool
	CodeEqual(code int64) bool
	//GetString() string
	WrapsAnother() bool
	GetWrapped() ErrorReport_struct
	Wrap(error_report ErrorReport_struct)
}

# Types ## Interfaces

type ErrorReport_struct

type ErrorReport_struct struct {
	Code    int64
	Data    map[string]interface{}
	Wrapped *ErrorReport_struct
}

## Structs

var (
	//## Exported Variables
	ERROR_REPORT_NIL_VALUE ErrorReport_struct = ErrorReport_struct{0, map[string]interface{}{}, nil}
)

Global Variables

func New

func New(code int64, data map[string]interface{}, wrapped_report *ErrorReport_struct) ErrorReport_struct

New creates a new Error Report.

func (ErrorReport_struct) CodeEqual

func (error_report ErrorReport_struct) CodeEqual(code int64) bool

CodeEqual returns true if the report's `code` property matches the `code` parametre given.

func (ErrorReport_struct) GetWrapped

func (error_report ErrorReport_struct) GetWrapped() ErrorReport_struct

GetWrapped returns the error report being wrapped by the current error report.

func (ErrorReport_struct) GetWrappedBottom

func (error_report ErrorReport_struct) GetWrappedBottom() (return_report ErrorReport_struct)

GetWrappedBottom returns the deepest wrapped report.

func (ErrorReport_struct) IsError

func (error_report ErrorReport_struct) IsError() bool

IsError returns true if the error report does signify an error.

func (ErrorReport_struct) NoError

func (error_report ErrorReport_struct) NoError() bool

NoError returns true if the error report doesn't signify any errors.

func (*ErrorReport_struct) Wrap

func (error_report *ErrorReport_struct) Wrap(wrap_report ErrorReport_struct)

Wrap wraps the given error report inside of this error report.

func (ErrorReport_struct) WrapsAnother

func (error_report ErrorReport_struct) WrapsAnother() bool

WrapsAnother returns true if this `error_report` wraps another error report.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL