Wesley Schwengle d91597b1c1
Check if subscribe event type is supported in AnyEvent::I3 (#5988)
Add simple `if exists' construct in the subscribe function. This
prevents a somewhat cryptic warnings such as these:

Use of uninitialized value $type in hash element at
/usr/share/perl5/AnyEvent/I3.pm line 309.

We still warn the user, but it is much clearer as to what the cause is.

It now shows something like this:

Could not subscribe to event type 'foo'. Supported events are _error
barconfig_update binding mode output shutdown tick window workspace

Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
2024-04-09 08:28:40 +02:00
..