mirror of
https://github.com/kemko/xc.git
synced 2026-01-01 15:55:43 +03:00
more informative errors when token is invalid
This commit is contained in:
@@ -90,6 +90,8 @@ func (i *Inventoree) Datacenters() []*store.Datacenter {
|
||||
func (i *Inventoree) Reload() error {
|
||||
err := i.loadRemote()
|
||||
if err != nil {
|
||||
term.Errorf("\n%s\n", err)
|
||||
term.Warnf("Trying to load data from cache...\n")
|
||||
// trying to use cache
|
||||
return i.loadLocal()
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ func parseExpression(expr []rune) ([]*token, error) {
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("Invalid symbol %s, expected -, *, %% or a hostname at position %d", string(sym), i)
|
||||
|
||||
case stateReadGroup:
|
||||
|
||||
if sym == '@' {
|
||||
|
||||
Reference in New Issue
Block a user