Skip to content

Error managment in VEGA #12

@ThomasAbballe

Description

@ThomasAbballe

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 ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions