exception

package
v0.0.0-...-6279077 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_DATABASE_ERROR  = "DATABASE_ERROR"
	VALIDATION_FAIL       = "VALIDATION_FAIL"
	INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"
	JSON_UNMARSHALL_ERROR = "JSON_UNMARSHALL_ERROR"
	USER_NOT_FOUND_ERROR  = "USER_NOT_FOUND_ERROR"
	RECORD_NOT_FOUND      = "RECORD_NOT_FOUND"
	FAIL_TO_SAVE          = "FAIL_TO_SAVE"
)

* const that defined with key on configuration json/messages.json

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorException

type ErrorException struct {
	Info configuration.MessageModel
}

func NewException

func NewException(errMessage string) *ErrorException

* creating new exception object and return it interface

func (ErrorException) Throw

func (ErrorException) Throw(message string) *ErrorException

* throwing message that defined with the const that exist on key json/messages.json and add some additional information from go

type ExceptionHelper

type ExceptionHelper interface {
	Throw(message string) *ErrorException
}

Jump to

Keyboard shortcuts

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