File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 11import _ from 'lodash' ;
2+ import minilog from 'minilog' ;
23
34import GeneratedBlocks from './generated.js' ;
45import MathBlocks from './math.js' ;
@@ -495,13 +496,16 @@ export default function (Blockly) {
495496
496497 Blockly . Ruby . blockToCode_ = Blockly . Ruby . blockToCode ;
497498
499+ minilog . enable ( ) ;
500+ const log = minilog ( 'ruby-generator' ) ;
498501 Blockly . Ruby . blockToCode = function ( block ) {
499502 if ( block && ! block . disabled && block . type . match ( / ^ h a r d w a r e _ / ) ) {
500503 this . definitions_ . prepare__init_hardware = 'init_hardware' ;
501504 }
502505 try {
503506 return this . blockToCode_ ( block ) ;
504507 } catch ( error ) {
508+ log . error ( `'${ block . type } ' block is not unsupported to generate Ruby code. Please implement it.` ) ;
505509 return null ;
506510 }
507511 } ;
You can’t perform that action at this time.
0 commit comments