diff --git a/exceptions/not_found.go b/exceptions/not_found.go new file mode 100644 index 0000000..eb9053a --- /dev/null +++ b/exceptions/not_found.go @@ -0,0 +1,13 @@ +package exceptions + +type NotFoundError struct { + Message string +} + +func NewNotFoundError(msg string) *NotFoundError { + return &NotFoundError{Message: msg} +} + +func (e NotFoundError) Error() string { + return e.Message +} diff --git a/exceptions/unsuccessful.go b/exceptions/unsuccessful.go new file mode 100644 index 0000000..22a9da9 --- /dev/null +++ b/exceptions/unsuccessful.go @@ -0,0 +1,11 @@ +package exceptions + +type UnsuccessfulOperationError struct{} + +func NewUnsuccessfulOperationError() *UnsuccessfulOperationError { + return &UnsuccessfulOperationError{} +} + +func (UnsuccessfulOperationError) Error() string { + return "Unsuccessful Operation" +}