bsp-layout icon indicating copy to clipboard operation
bsp-layout copied to clipboard

reloading bsp-layout with no layout raises an error

Open amtoine opened this issue 2 years ago • 3 comments

I am testing out the script right now.

without any layout set with bsp-layout, running bsp-layout reload gives the following error:

ls: cannot access '/tmp/bsp-layout.state/desktops': No such file or directory

i think it would be nice to have a proper error message for the user! :yum:

what about something like the following? :slightly_smiling_face:

$ bsp-layout
No layout is currently registered by `bsp-layout` ('/tmp/bsp-layout.state/desktops' does not exist).
Try to register your first layout with `bsp-layout set`.
If the problem persists, please report the issue on https://github.com/phenax/bsp-layout/issues.
Terminating...

amtoine avatar Jun 16 '22 17:06 amtoine

that is an appropriate priority level :yum:

amtoine avatar Jun 16 '22 19:06 amtoine

I think the error message might be too long. How about:

No layout is currently registered. Try to register your first layout with `bsp-layout set`.

If more info is required, like the tmp file path, verbose (does not exist yet) can be used.

darkelectron avatar Sep 04 '22 03:09 darkelectron

@darkelectron

I think the error message might be too long. How about:

yes you're right :thinking:

If more info is required, like the tmp file path, verbose (does not exist yet) can be used.

i like the idea of the --verbose flag :+1:

amtoine avatar Sep 04 '22 09:09 amtoine