Retrieving Mesh Problem Information
There are three categories of problems that can appear in a meshing sequence: MeshInformation, MeshWarning, and MeshError features. They all contain a message describing the problem and can be equipped with a selection defining the geometric entities or coordinate values specifying a position related to the error. All of these features can have a subfeature of the same type that contains low-level problem information. This means that a problem can be represented by a stack of features that reflects the stack trace of the problem.
For more information about the severity of the problems and possible ways to fix them, see the section Information, Warnings, and Errors for Meshing Operations.
Use
boolean problem = model.component(<ctag>).mesh(<tag>).feature(<ftag>).hasProblems();
to find out if the feature <ftag> has any reported problems. There are similar methods, hasWarnings() and hasErrors(), for warnings and errors, respectively. The following method returns the tags of the problems as well as tags that refer to information:
String[] problemTags = model.component(<ctag>).mesh(<tag>).feature(<ftag>).problems();
Similarly, use the methods warnings() and errors() to get access to only warning and error tags, respectively.
The following two methods return the message and any entity selection of the problem <ptag>.
String problemMessage = model.component(<ctag>).mesh(<tag>).feature(<ftag>).
problem(<ptag>).message();
MeshSelection sel = model.component(<ctag>).mesh(<tag>).feature(<ftag>).
problem(<ptag>).selection();
To retrieve the full stack trace, repeat the above methods until all levels of reported problems have been accessed. See the section Retrieving Problem Information for an example of how to retrieve mesh warnings recursively.