better warning message if a pin label is missing during analysis

This commit is contained in:
hneemann 2017-12-11 21:43:25 +01:00
parent 7d21b4ebf1
commit 2e7ca34754
4 changed files with 11 additions and 7 deletions

View File

@ -530,7 +530,8 @@ public class Model implements Iterable<Node> {
if (signal.isValid()) {
signals.add(signal);
outputs.add(signal);
}
} else
isInvalidSignal = true;
}
/**

View File

@ -998,7 +998,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
.setVisible(true);
ensureModelIsStopped();
} catch (PinException | NodeException | AnalyseException | ElementNotFoundException | BacktrackException | RuntimeException e1) {
showErrorAndStopModel(Lang.get("msg_analyseErr"), e1);
new ErrorMessage(Lang.get("msg_analyseErr")).addCause(e1).show(Main.this);
}
}
}
@ -1042,7 +1042,7 @@ public final class Main extends JFrame implements ClosingWindowListener.ConfirmS
circuitComponent.modify(new ModifyMeasurementOrdering(names));
}
} catch (NodeException | PinException | ElementNotFoundException | RuntimeException e) {
showErrorAndStopModel(Lang.get("msg_errorCreatingModel"), e);
new ErrorMessage(Lang.get("msg_errorCreatingModel")).addCause(e).show(Main.this);
}
}

View File

@ -1234,8 +1234,9 @@ eine &lt;a href=&quot;https://github.com/hneemann/Digital/issues/new?labels=enha
<string name="msg_errInFile_N">Aufgetreten in Datei {0}.</string>
<string name="msg_affectedComponentsAre_N">Betroffen sind: {0}.</string>
<string name="msg_signal_N">Leitung {0}</string>
<string name="msg_invalidSignalsAnalysed">Wenn Eingänge keinen Namen haben, werden diese nicht
als Variablen in die Analyse einbezogen, sondern wie Konstanten behandelt!</string>
<string name="msg_invalidSignalsAnalysed">Wenn Eingänge keine Bezeichnung haben, werden diese nicht
als Variablen in die Analyse einbezogen, sondern wie Konstanten behandelt!
Ausgänge, die keine Bezeichnung haben, werden ignoriert.</string>
<string name="msg_thereAreMissingPinNumbers">Für die Pins {0} wurden keine Pinnummern festgelegt!</string>
<string name="msg_modelHasErrors">Es kann nur eine fehlerfreie Schaltung exportiert werden!</string>
<string name="msg_noKVMapAvailable">Keine KV-Tafel verfügbar!</string>

View File

@ -1219,8 +1219,10 @@ an &lt;a href=&quot;https://github.com/hneemann/Digital/issues/new?labels=enhanc
<string name="msg_errInFile_N">Occurred in file {0}.</string>
<string name="msg_affectedComponentsAre_N">Affected are: {0}.</string>
<string name="msg_signal_N">Signal {0}</string>
<string name="msg_invalidSignalsAnalysed">If inputs have no name set, they are not included
as variables in the analysis, but treated as constants!</string>
<string name="msg_invalidSignalsAnalysed">If inputs have no label set, they are not included
as variables in the analysis, but treated as constants!
Outputs without a label are ignored.
</string>
<string name="msg_thereAreMissingPinNumbers">No pin numbers assigned to the pins {0}!</string>
<string name="msg_modelHasErrors">You can only export a circuit without errors!</string>
<string name="msg_noKVMapAvailable">No KV map available!</string>