1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

cast: throw exception for invalid signals

This commit is contained in:
Steffen Vogel 2019-06-11 16:20:35 +00:00
parent 923ef88fb5
commit c863cac804

View file

@ -81,6 +81,8 @@ public:
enum signal_type type;
orig_sig = (struct signal *) vlist_at_safe(&signals, signal_index);
if (!orig_sig)
throw RuntimeError("Failed to find signal: {}", signal_name);
type = new_type != SIGNAL_TYPE_INVALID ? new_type : orig_sig->type;
name = new_name ? new_name : orig_sig->name;