mirror of
https://github.com/google/blockly.git
synced 2026-01-04 07:30:08 +01:00
@@ -183,7 +183,7 @@ Blockly.Python['lists_getIndex'] = function(block) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
throw 'Unhandled combination (lists_getIndex).';
|
||||
throw Error('Unhandled combination (lists_getIndex).');
|
||||
};
|
||||
|
||||
Blockly.Python['lists_setIndex'] = function(block) {
|
||||
@@ -254,7 +254,7 @@ Blockly.Python['lists_setIndex'] = function(block) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
throw 'Unhandled combination (lists_setIndex).';
|
||||
throw Error('Unhandled combination (lists_setIndex).');
|
||||
};
|
||||
|
||||
Blockly.Python['lists_getSublist'] = function(block) {
|
||||
@@ -277,7 +277,7 @@ Blockly.Python['lists_getSublist'] = function(block) {
|
||||
var at1 = '';
|
||||
break;
|
||||
default:
|
||||
throw 'Unhandled option (lists_getSublist)';
|
||||
throw Error('Unhandled option (lists_getSublist)');
|
||||
}
|
||||
switch (where2) {
|
||||
case 'FROM_START':
|
||||
@@ -298,7 +298,7 @@ Blockly.Python['lists_getSublist'] = function(block) {
|
||||
var at2 = '';
|
||||
break;
|
||||
default:
|
||||
throw 'Unhandled option (lists_getSublist)';
|
||||
throw Error('Unhandled option (lists_getSublist)');
|
||||
}
|
||||
var code = list + '[' + at1 + ' : ' + at2 + ']';
|
||||
return [code, Blockly.Python.ORDER_MEMBER];
|
||||
@@ -349,7 +349,7 @@ Blockly.Python['lists_split'] = function(block) {
|
||||
Blockly.Python.ORDER_MEMBER) || '\'\'';
|
||||
var code = value_delim + '.join(' + value_input + ')';
|
||||
} else {
|
||||
throw 'Unknown mode: ' + mode;
|
||||
throw Error('Unknown mode: ' + mode);
|
||||
}
|
||||
return [code, Blockly.Python.ORDER_FUNCTION_CALL];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user