We need better error messages in the case of invalid XML files

Bug #1123203 reported by Michele Simionato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Michele Simionato

Bug Description

Vitor was running a scenario_damage calculator and in the fragility_model file he accidentally wrote

        <IML IMT="MMI">7 8 9 10 11</IML>
        <description>Fragility model for Pavia (discrete)</description>

instead of

        <description>Fragility model for Pavia (discrete)</description>

        <IML IMT="MMI">7 8 9 10 11</IML>

The error message was unhelpful: http://pastebin.com/08j7cpvM

In general we should use the method assertValid (which returns a good error message) and not validate (which returns a boolean)
in the nrml parsers.

Revision history for this message
Michele Simionato (michele-simionato) wrote :

Actually the problem was with

 <IML IMT="PGA"></IML>
<description>Fragility model for Nepal (continuous)</description>

instead of

<description>Fragility model for Nepal (continuous)</description>
 <IML IMT="PGA"></IML>

 but the point stands.

Revision history for this message
matley (matley) wrote :

is it still valid?

Revision history for this message
Michele Simionato (michele-simionato) wrote :

No, it was fixed and released before 1.0

Changed in openquake-old:
assignee: nobody → Michele Simionato (michele-simionato)
milestone: none → 1.0.0
status: New → Fix Released
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.