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
}
Click to show internal directories.
Click to hide internal directories.