better error messages in power supply

This commit is contained in:
hneemann 2017-07-20 20:26:37 +02:00
parent 990565071a
commit 1b39561f42
3 changed files with 11 additions and 19 deletions

View File

@ -6,10 +6,6 @@
<string>Description</string>
<string>12-bit BCD counter</string>
</entry>
<entry>
<string>lockedMode</string>
<boolean>true</boolean>
</entry>
</attributes>
<visualElements>
<visualElement>

View File

@ -6,10 +6,6 @@
<string>Description</string>
<string>12-bit hex counter</string>
</entry>
<entry>
<string>lockedMode</string>
<boolean>true</boolean>
</entry>
</attributes>
<visualElements>
<visualElement>
@ -219,11 +215,6 @@ repeat(2&lt;&lt;12) C bits(4,(n+1)&gt;&gt;8) bits(4,(n+1)&gt;&gt;4) bits(4,(n+1)
<elementAttributes/>
<pos x="0" y="-500"/>
</visualElement>
<visualElement>
<elementName>VDD</elementName>
<elementAttributes/>
<pos x="680" y="-500"/>
</visualElement>
<visualElement>
<elementName>Ground</elementName>
<elementAttributes/>
@ -239,6 +230,11 @@ repeat(2&lt;&lt;12) C bits(4,(n+1)&gt;&gt;8) bits(4,(n+1)&gt;&gt;4) bits(4,(n+1)
<elementAttributes/>
<pos x="-160" y="-180"/>
</visualElement>
<visualElement>
<elementName>VDD</elementName>
<elementAttributes/>
<pos x="680" y="-500"/>
</visualElement>
</visualElements>
<wires>
<wire>
@ -561,14 +557,14 @@ repeat(2&lt;&lt;12) C bits(4,(n+1)&gt;&gt;8) bits(4,(n+1)&gt;&gt;4) bits(4,(n+1)
<p1 x="140" y="-240"/>
<p2 x="140" y="-160"/>
</wire>
<wire>
<p1 x="-160" y="-500"/>
<p2 x="-160" y="-480"/>
</wire>
<wire>
<p1 x="-160" y="-200"/>
<p2 x="-160" y="-180"/>
</wire>
<wire>
<p1 x="-160" y="-500"/>
<p2 x="-160" y="-480"/>
</wire>
<wire>
<p1 x="-160" y="-480"/>
<p2 x="-160" y="-400"/>

View File

@ -49,9 +49,9 @@ public class PowerSupply extends Node implements Element {
@Override
public void readInputs() throws NodeException {
if (vcc.getValue() != 1 || vcc.isHighZ())
throw new NodeException(Lang.get("err_errorInPowerSupply", "VCC"), vcc);
throw new NodeException(Lang.get("err_errorInPowerSupply", "VCC"), this, 0, vcc.asList());
if (gnd.getValue() != 0 || gnd.isHighZ())
throw new NodeException(Lang.get("err_errorInPowerSupply", "GND"), gnd);
throw new NodeException(Lang.get("err_errorInPowerSupply", "GND"), this, 1, gnd.asList());
}
@Override