diff options
Diffstat (limited to 'TCLAP/tclap/ArgException.h')
-rw-r--r-- | TCLAP/tclap/ArgException.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/TCLAP/tclap/ArgException.h b/TCLAP/tclap/ArgException.h index f789d1c..1e0f659 100644 --- a/TCLAP/tclap/ArgException.h +++ b/TCLAP/tclap/ArgException.h @@ -5,6 +5,7 @@ * file: ArgException.h * * Copyright (c) 2003, Michael E. Smoot . + * Copyright (c) 2017 Google LLC * All rights reserved. * * See the file COPYING in the top directory of this distribution for @@ -184,6 +185,18 @@ class SpecificationException : public ArgException }; +/** + * Thrown when TCLAP thinks the program should exit. + * + * For example after parse error this exception will be thrown (and + * normally caught). This allows any resource to be clened properly + * before exit. + * + * If exception handling is disabled (CmdLine::setExceptionHandling), + * this exception will propagate to the call site, allowing the + * program to catch it and avoid program termination, or do it's own + * cleanup. See for example, https://sourceforge.net/p/tclap/bugs/29. + */ class ExitException { public: ExitException(int estat) : _estat(estat) {} |