intel / buxton

8 stars 9 forks source link

Counter-intuitive group errors #137

Open ikeydoherty opened 10 years ago

ikeydoherty commented 10 years ago

Currently the requirement for group creation leads to .. well.. misleading errors:

ikey@evolveos ~/Work/build
$ ./buxtonctl set-string user test test test
ikey@evolveos ~/Work/build
$ ./buxtonctl get-string user test test
unknown type
ikey@evolveos ~/Work/build

Obviously once the group is created, all is well:

ikey@evolveos ~/Work/build
$ ./buxtonctl create-group user test
ikey@evolveos ~/Work/build
$ ./buxtonctl set-string user test test test
ikey@evolveos ~/Work/build
$ ./buxtonctl get-string user test test
[user] test:test = string: test
ikey@evolveos ~/Work/build

Perhaps this particular error needs documenting, i.e. set should fail when the group isn't created first.

ikeydoherty commented 10 years ago

Note this also adversely affects the gtk demo, but I take ownership on that problem :) Suggestions on how to best do this would be cool.

bryteise commented 10 years ago

First we need to define the set of errors the daemon can produce and then forward them along as an int that the client lib can use to report what actually happened.