Closed daverolli closed 3 years ago
It seems there was a required attribute that didn't get validated (case 4). I've added a generic validation scheme so that won't happen in the future. The various error cases are currently (next snapshot) implemented as below. Let me know if you think I forgot anything.
link2
)current:
unexpected element (uri:"", local:"link2"). Expected elements are <{}actuator>,<{}joint>,<{}overrideableElement>,<{}end-effector>,<{}bracket>,<{}link>,<{}rigid-body>
changed to:
Invalid content was found starting with element 'actuator2'. One of '{actuator, link, bracket, end-effector, rigid-body, joint}' is expected.
<link ... unknown_attribute="3"/>
current: silently ignored
changed to:
lineNumber: 2; columnNumber: 42; cvc-complex-type.3.2.2: Attribute 'unknown_attribute' is not allowed to appear in element 'link'.'
type="X5-3"
or extension="pretty long"
)Unknown value: X5-3
Invalid floating point number: 'pretty long'. Expected number or formula
type2="X5"
)current:
NullPointerException
changed to:
lineNumber: 2; columnNumber: 34; cvc-complex-type.4: Attribute 'type' must appear on element 'link'.
<link type="X5-1"
)lineNumber: 3; columnNumber: 3; The element type "link" must be terminated by the matching end-tag "</link>
Right the error messages when there's a typo in an HRDF aren't very useful. You usually just get:
input file is not a valid hrdf file: null
.Any sort of hit as to even what line the parsing failed would help a ton.