Skip to content
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

Error managment in VEGA #12

Open
ThomasAbballe opened this issue Oct 4, 2016 · 1 comment
Open

Error managment in VEGA #12

ThomasAbballe opened this issue Oct 4, 2016 · 1 comment
Labels

Comments

@ThomasAbballe
Copy link
Collaborator

I am doing a bit of cleaning in the way VEGA handles error, especially in the Nastran reader. For now, some errors throw exceptions, others don't, and I don't know what is a warning and what is not. As a result, VEGA crashes way too often, sometimes for something minors.

Let's first talk about needs:

  1. I, and our clients, want VEGA to do its best. If it doesn't recognize a keyword, it should continue the work, and see what happens. If it's an unrecognized option, it should take the default value and issue a simple warning.
  2. As a debugger, I also need a way to stop at the first warning.
  3. As a developer, I know some functions must rigorously throw exceptions. Because exceptions and fatal errors are better than a stack overflow crash.

What we have now, in VEGA is:

  1. Point 1 is addressed by the the option --best-effort, even if it doesn't always work as intended.
  2. Same goes for point 2 and the --strict option.
  3. There is also a --mesh-only option. I don't know what criteria is used to switch to this mode.

The way I see things, we should have:

  • Critical errors will crashed VEGA, for example a non-existent degree of freedom (ex : 4 for a solid, 7 for a beam, etc). We always stop the program. It's hard to know what exactly should be tested. Most of time, VEGA assumes the input file is "correct for its original reader", and it seems to me that most critical errors will arise when it is not.
  • Errors: unrecognized command. We should stop the program, as a part of our model will be missing.
  • Warnings : mostly unrecognized options. Default values are assumed, VEGA is not stopped.

Strictness should be 0 (default, stop on critical errors), 1 (stop on both errors), 2 (stop on errors and warning)

Sorry for the long post. I am awaiting your opinions on this topic. Please forgive me if I only told obvious things, and correct me if I missed a point ;)

@ThomasAbballe
Copy link
Collaborator Author

I just added generic handlers to manage errors and warnings in Parsers and Writers. The actual politic on this topic is yet to be defined., but, whatever it will be, it should be easier to implement now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant