Give nicer error messages when user provides values for ports that do not exist

This commit is contained in:
Evan Czaplicki 2014-01-14 14:00:19 +01:00
parent f619026fcc
commit 0fd74d4fad

View file

@ -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 +