Added errors for services

This commit is contained in:
KamilM1205 2025-09-23 22:03:00 +04:00
parent ab4b53fd40
commit c3c3d65d32
12 changed files with 217 additions and 86 deletions

View file

@ -4,12 +4,12 @@ type DBError struct {
msg string
}
func NewDBError(msg string) DBError {
return DBError{
func NewDBError(msg string) *DBError {
return &DBError{
msg: msg,
}
}
func (e *DBError) Error() string {
return e.msg
return "Database error:" + e.msg
}