aicra/errors.go

24 lines
643 B
Go
Raw Normal View History

package aicra
// cerr allows you to create constant "const" error with type boxing.
type cerr string
func (err cerr) Error() string {
return string(err)
}
2020-04-04 10:40:21 +00:00
// errLateType - cannot add datatype after setting up the definition
const errLateType = cerr("types cannot be added after Setup")
2020-04-04 10:40:21 +00:00
// errNotSetup - not set up yet
const errNotSetup = cerr("not set up")
2020-04-04 10:40:21 +00:00
// errAlreadySetup - already set up
const errAlreadySetup = cerr("already set up")
2020-04-04 10:40:21 +00:00
// errUnknownService - no service matching this handler
const errUnknownService = cerr("unknown service")
2020-04-04 10:40:21 +00:00
// errMissingHandler - missing handler
const errMissingHandler = cerr("missing handler")