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 NewFromJSON ¶
func NewFromJSON(text string) FabricError
NewFromJSON creates a Frabric error based on JSON string error representation.
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.
Click to show internal directories.
Click to hide internal directories.