Give nicer error messages when user provides values for ports that do not exist
This commit is contained in:
parent
f619026fcc
commit
0fd74d4fad
1 changed files with 3 additions and 2 deletions
|
@ -142,8 +142,9 @@ function checkPorts(elm) {
|
|||
var uses = portUses[key]
|
||||
if (uses === 0) {
|
||||
throw new Error(
|
||||
"Initialization Error: there is no port named '" + key + "'.\n" +
|
||||
"You should probably remove that input from your initialization code.");
|
||||
"Initialization Error: provided port '" + key +
|
||||
"' to a module that does not take it as in input.\n" +
|
||||
"Remove '" + key + "' from the module initialization code.");
|
||||
} else if (uses > 1) {
|
||||
throw new Error(
|
||||
"Initialization Error: port '" + key +
|
||||
|
|
Loading…
Reference in a new issue