aseba-community / aseba

Aseba is a set of tools which allow beginners to program robots easily and efficiently. To contact us, please open an issue.
http://aseba.wikidot.com
GNU Lesser General Public License v3.0
49 stars 61 forks source link

When opening VPL files, unknown blocks reported with "-1:-1" as location #822

Open ypiguet-epfl opened 6 years ago

ypiguet-epfl commented 6 years ago

In Aseba Studio, VPL window, when opening an aesl file with an unknown block (unknown name attribute in block element), the error message Error in XML source file at -1:-1 : cannot create block foo where foo is the block name.

Test file:

<!DOCTYPE aesl-source>
<network>
<keywords flag="true"/>
<node nodeId="1" name="thymio-II">
<toolsPlugins>
<ThymioVisualProgramming>
<vplroot xml-format-version="1">
<program advanced_mode="0">
<set>
<block type="event" name="foo"/>
</set>
</program>
</vplroot>
</ThymioVisualProgramming>
</toolsPlugins>
</node>
</network>

Suggestion: if you can't get the position of the error, suppress at -1:-1 in the error message.

ypiguet-epfl commented 6 years ago

Ok, it's a tiny minor issue, but "-1:-1" in a user-visible alert isn't a bug? The fix must be 1-2 lines of code, way less work than reporting it here for those who can just push a change.