From db4d37cd7ca09ca3250f9efa683424e2124ceeb9 Mon Sep 17 00:00:00 2001 From: mes5k Date: Thu, 14 Oct 2004 19:03:32 +0000 Subject: [PATCH] added failure to the interface --- include/tclap/CmdLineInterface.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/tclap/CmdLineInterface.h b/include/tclap/CmdLineInterface.h index 05f1785..331f030 100644 --- a/include/tclap/CmdLineInterface.h +++ b/include/tclap/CmdLineInterface.h @@ -91,6 +91,13 @@ class CmdLineInterface */ virtual void version( int exitVal = 0 )=0; + /** + * Prints (to stderr) an error message, short usage and exits with a + * value of 1. Can be overridden to produce alternative behavior. + * \param e - The ArgException that caused the failure. + */ + virtual void failure( const ArgException& e )=0; + /** * Parses the command line. * \param argc - Number of arguments.