errors

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errors has Fabric Platform base error module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FabricError

type FabricError struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	HTTPCode    int    `json:"httpCode,omitempty"`
	ReturnValue int    `json:"returnValue"`
}

FabricError represents a shared error model.

func New

func New(returnValue int, name, description string) FabricError

New Creates a new BaseError.

func NewEmpty

func NewEmpty() FabricError

NewEmpty creates a new empty BaseError.

func NewFromJSON

func NewFromJSON(text string) FabricError

NewFromJSON creates a Frabric error based on JSON string error representation.

func (*FabricError) Error

func (e *FabricError) Error() string

Error interface implementation.

func (*FabricError) String

func (e *FabricError) String() string

String returns an string representation of BaseError.

func (*FabricError) ToJSON

func (e *FabricError) ToJSON() (string, error)

ToJSON encode FabircError to JSON string.

Jump to

Keyboard shortcuts

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