on master help sign in
Give nicer error messages when user provides values for ports that do not exist
commit0fd74d4fadf6404b23b9ed3860060c3fecbeac3d authorEvan Czaplicki <info@elm-lang.org> dateTue 14 Jan 2014, 14:00 (13 years ago) parentf619026
1 file changed+3−2
runtime/Init.js+3−2
runtime/Init.js+3−2
@@ -142,8 +142,9 @@ function checkPorts(elm) {
142142 var uses = portUses[key]
143143 if (uses === 0) {
144144 throw new Error(
145− "Initialization Error: there is no port named '" + key + "'.\n" +
146− "You should probably remove that input from your initialization code.");
145+ "Initialization Error: provided port '" + key +
146+ "' to a module that does not take it as in input.\n" +
147+ "Remove '" + key + "' from the module initialization code.");
147148 } else if (uses > 1) {
148149 throw new Error(
149150 "Initialization Error: port '" + key +