From 291ca371e2974a55799174e2a5447928cab57802 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 20:55:33 -0400 Subject: [PATCH] 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 --- lib/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/command.c b/lib/command.c index cc597952e..8ef9fae83 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); } -- 2.39.2