display-switch icon indicating copy to clipboard operation
display-switch copied to clipboard

Confusing error on invalid `on_usb_connect` setting

Open dbr opened this issue 4 years ago • 0 comments

Thanks for this tool, works nicely! One minor thing I encountered while setting it up: if on_usb_connect = "Hdmi1" is set to an invalid value (e.g in my case I guessed "Dp1" before noticing it should be "DisplayPort1"), the error is unhelpful in working out what the cause is:

$ cargo run --
[...]
Error: failed to load configuration

Caused by:
    ParseIntError { kind: InvalidDigit }

This should at least mention the configuration option at fault, and ideally maybe give a list of the available options?

dbr avatar Jul 07 '21 01:07 dbr