Throw errors instead of strings. (#1974)

Blocks and generators
This commit is contained in:
Neil Fraser
2018-07-16 16:33:44 -07:00
committed by GitHub
parent 99ebefa1bf
commit c8bfc888c8
23 changed files with 55 additions and 55 deletions

View File

@@ -358,7 +358,7 @@ Blockly.Lua['lists_split'] = function(block) {
}
functionName = 'table.concat';
} else {
throw 'Unknown mode: ' + mode;
throw Error('Unknown mode: ' + mode);
}
var code = functionName + '(' + input + ', ' + delimiter + ')';
return [code, Blockly.Lua.ORDER_HIGH];