electricity_bill_calc_service/exceptions/not_found.go

20 lines
372 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package exceptions
import "fmt"
type NotFoundError struct {
Message string
}
func NewNotFoundError(msg string) *NotFoundError {
return &NotFoundError{Message: msg}
}
func NewNotFoundErrorFromError(msg string, err error) *NotFoundError {
return &NotFoundError{Message: fmt.Sprintf("%s%v", msg, err)}
}
func (e NotFoundError) Error() string {
return e.Message
}