-
Notifications
You must be signed in to change notification settings - Fork 5
Emit exciption for number parsing error #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for keywords of type int, float. To be consistent, change the name of boolError to clBoolParsingError.
…ion. CMakeLists.txt: Complied Bison and flex files with C++ SetVar.cc: VerifyVal() now intercepts number parsing errors also. clError.h: Moved clBoolParsingError type here, and removed boolError.h callback.cc, clParseVal.cc, isBool.cc: Removed inclusion of boolError.h
|
Checks that have been done:
Issues:
|
|
The issue mentioned above is probably more of a developer's choice, instead of a bug. For example, I tested this
@sanbee It's up to you to decide how you'd like to handle these incorrect inputs to the keywords. Making |
|
I Your second comment about setting
|
agawatw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question about parafeed does not issue exceptions in the help=noprompt mode has been addressed and Sanjay will look into how the factory setting information can become available to the internals of the library in this mode at a later time.
The rest of the changes seems good to be merged.
The code in this branch intercept number parsing error from the parser and throw a C++ exception.
Two specializations of the clError class --
clBoolParsingErrorandclNumParsingErrorare also defined. These are thrown for error in parsing bool, float or int type values. The exceptions are thrown in interactive as well non-interactive (CLI) modes.The baseclass
ErrorObjis now a derivative of thestd::exceptionclass.The exception generation mechanism is not optimal yet, till I figure out some
cmake'ism I don't quite understand.