goerr

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: MIT Imports: 3 Imported by: 18

README

错误信息帮助类

返回一个 error ,同时包括自定义的说明及原始的错误信息

host,err:=os.hostname();
if err!=nil{
return goerr.NewError(err,"取主机名时出错")
}

Documentation

Overview

一个简单的生成错误的帮助类

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error) *errorContext

new errorContext with error

return  error

func Errorf added in v1.1.1

func Errorf(err error, format string, p ...interface{}) error

new errorContext with error and string

return error

func String added in v1.1.1

func String(format string, p ...interface{}) *errorContext

new errorContext with string

Types

This section is empty.

Jump to

Keyboard shortcuts

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