2023-08-19 09:12:26 +03:00
|
|
|
package tg
|
2023-08-10 15:49:25 +03:00
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
2023-08-11 10:41:17 +03:00
|
|
|
"fmt"
|
2023-08-10 15:49:25 +03:00
|
|
|
)
|
|
|
|
|
2023-08-11 10:41:17 +03:00
|
|
|
type WrongUpdateType struct {
|
|
|
|
Type string
|
|
|
|
}
|
|
|
|
|
2023-08-10 15:49:25 +03:00
|
|
|
var (
|
2023-08-15 16:02:14 +03:00
|
|
|
ScreenNotExistErr = errors.New("screen does not exist")
|
|
|
|
SessionNotExistErr = errors.New("session does not exist")
|
|
|
|
KeyboardNotExistErr = errors.New("keyboard does not exist")
|
|
|
|
NotAvailableErr = errors.New("the context is not available")
|
|
|
|
EmptyKeyboardTextErr = errors.New("got empty text for a keyboard")
|
2023-08-16 17:25:56 +03:00
|
|
|
ActionNotDefinedErr = errors.New("action was not defined")
|
2023-09-16 14:34:17 +03:00
|
|
|
MapCollisionErr = errors.New("map collision occured")
|
2023-09-26 17:13:31 +03:00
|
|
|
ContextNotExistErr = errors.New("the context does not exist")
|
2023-08-10 15:49:25 +03:00
|
|
|
)
|
2023-08-11 10:41:17 +03:00
|
|
|
|
|
|
|
func (wut WrongUpdateType) Error() string {
|
|
|
|
if wut.Type == "" {
|
|
|
|
return "wrong update type"
|
|
|
|
}
|
|
|
|
return fmt.Sprintf("wrong update type '%s'", wut.Type)
|
|
|
|
}
|