commands.c: Improve error replies

- Improve / add various error messages.
- Replace all `LOG(…); ysuccess(false);` with `yerror(…);`.
- switch_mode: Remove redundant "ERROR:" ELOG string.
- cmd_move_con_to_workspace*: Make sure that we don't try to move an
empty workspace to another workspace. This can be problematic when we
match a workspace using command criteria (eg marks) and the target is a
non-existing workspace. We create the new workspace but since nothing is
moved there, we are left with an empty workspace. See added testcase.
This commit is contained in:
Orestis Floros
2018-09-11 07:44:40 +03:00
parent 83327abae4
commit e67be1ccd3
3 changed files with 82 additions and 99 deletions

View File

@ -647,7 +647,7 @@ void switch_mode(const char *new_mode) {
return;
}
ELOG("ERROR: Mode not found\n");
ELOG("Mode not found\n");
}
static int reorder_binding_cmp(const void *a, const void *b) {