From: Donald Sharp Date: Tue, 16 May 2017 00:55:33 +0000 (-0400) Subject: lib: Improve error message for the developer X-Git-Tag: reindent-master-before~156^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=291ca371e2974a55799174e2a5447928cab57802;p=matthieu%2Ffrr.git lib: Improve error message for the developer I keep getting people asking me about what to do when this error is generated when they are programming new cli. Maybe this is a bit better bread-crumb? Signed-off-by: Donald Sharp --- diff --git a/lib/command.c b/lib/command.c index cc597952e4..8ef9fae832 100644 --- a/lib/command.c +++ b/lib/command.c @@ -324,6 +324,7 @@ install_element (enum node_type ntype, struct cmd_element *cmd) { fprintf (stderr, "Command node %d doesn't exist, please check it\n", ntype); + fprintf (stderr, "Have you called install_node before this install_element?\n"); exit (EXIT_FAILURE); } @@ -371,6 +372,7 @@ uninstall_element (enum node_type ntype, struct cmd_element *cmd) { fprintf (stderr, "Command node %d doesn't exist, please check it\n", ntype); + fprintf (stderr, "Have you called install_node before this install_element?\n"); exit (EXIT_FAILURE); }