RISCSoftware / cpacs_tigl_gen

Generates CPACS schema based classes for TiGL
Apache License 2.0
5 stars 5 forks source link

CPACS error messages should be more descriptive #2

Closed rainman110 closed 7 years ago

rainman110 commented 7 years ago

Currently, when I open a slighty faulty CPACS file, I get the following error messages

ERR 03/23 14:56:34 CPACSWingShell.cpp:49] Required attribute uID is missing ERR 03/23 14:56:34 CPACSWingComponentSegmentStructure.cpp:59] Required element lowerShell is missing

It would be cool, if we could also say, in what XML path this error is. e.g:

ERR 03/23 14:56:34 CPACSWingShell.cpp:49] Required attribute uID is missing in /cpacs/vehicles/aircraft/model/wings/wing[1]/componentSegments/componentSegment[1] ERR 03/23 14:56:34 CPACSWingComponentSegmentStructure.cpp:59] Required element lowerShell is missing in /cpacs/vehicles/aircraft/model/wings/wing[1]/componentSegments/componentSegment[1]

I think, that this can easiliy be added to the generator, right?

rainman110 commented 7 years ago

@dixxi @RlanderRISCSW I am on it, I'll create a PR!

bernhardmgruber commented 7 years ago

oh, i just fixed that minutes ago^^

bernhardmgruber commented 7 years ago

in: 7a643f5e346c1ab2a3fc9fd3f97deaf67338b7d4

rainman110 commented 7 years ago

NP! Also great. At least I was motivated to look into the generator code ;)

rainman110 commented 7 years ago

Funny... my diff looks the same

rainman110 commented 7 years ago

Now this is looking just as it should be:

ERR 03/23 16:43:18 CPACSWingShell.cpp:49] Required attribute uID is missing at xpath /cpacs/vehicles/aircraft/model/wings/wing[1]/componentSegments/componentSegment[1]/structure/upperShell ERR 03/23 16:43:18 CPACSWingComponentSegmentStructure.cpp:59] Required element lowerShell is missing at xpath /cpacs/vehicles/aircraft/model/wings/wing[1]/componentSegments/componentSegment[1]/structure