Documentation
¶
Index ¶
- type Error
- func InvalidCastError(from, to interface{}) Error
- func New(errType ErrorType, message string) Error
- func NewWithErrorCode(errType ErrorType, message string, errCode string) Error
- func NewWithErrorCodeAndHttpStatusCode(errType ErrorType, message, errorCode string, httpStatusCode int) Error
- func NewWithHttpStatusCode(errType ErrorType, message string, httpStatusCode int) Error
- func NullReferenceError(fieldName string) Error
- type ErrorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error interface {
ErrorType() ErrorType
ErrorCode() string
HttpStatusCode() int
Error() string
ErrorWithTrace() string
With(err error) Error
}
Error defines custom error
func InvalidCastError ¶
func InvalidCastError(from, to interface{}) Error
InvalidCastError Create an instance of Invalid Cast Error with object types
func NewWithErrorCode ¶ added in v1.3.0
NewWithErrorCode Create an instance of Error with errType, message, code
func NewWithErrorCodeAndHttpStatusCode ¶ added in v1.3.0
func NewWithErrorCodeAndHttpStatusCode(errType ErrorType, message, errorCode string, httpStatusCode int) Error
NewWithErrorCodeAndHttpStatusCode Create an instance of Error with extra errorCode and httpStatusCode
func NewWithHttpStatusCode ¶ added in v1.3.0
NewWithHttpStatusCode Create an instance of Error with errType, message, code
func NullReferenceError ¶ added in v1.2.0
NullReferenceError Create an instance of Null Reference Error with object name
Click to show internal directories.
Click to hide internal directories.