rem: else if(children[i].name()==='station') { var name=children[i].attr('name').value(); var id=children[i].attr('id').value();  var category = { service: 'webradio', type: 'webradio', title: name, artist: '', album: '', icon: 'fa fa-microphone', uri: 'http: };  list.push(category); }  }  defer.resolve(list); } else { self.commandRouter.logger.info('An error occurred while querying SHOUTCAST'); defer.resolve(); } }); 
add: else promise.reject(new Error()); }); 
context:     .then( function (xml) {        if(xml.ok)        {            var xmlDoc = libxmljs.parseXml(xml.body);            var children = xmlDoc.root().childNodes();            var base;            for(var i in children)            {                if(children[i].name()==='tunein')                {                    base=(children[i].attr('base').value()).replace('.pls','.m3u');                }                else if(children[i].name()==='station')                {                    var name=children[i].attr('name').value();                    var id=children[i].attr('id').value();                    var category = {                        service: 'webradio',                        type: 'webradio',                        title: name,                        artist: '',                        album: '',                        icon: 'fa fa-microphone',                        uri: 'http://yp.shoutcast.com' + base+'?id='+id                    };                    list.push(category);                }            }            defer.resolve(list);        }        else        {            self.commandRouter.logger.info('An error occurred while querying SHOUTCAST');            defer.resolve();        }    });
meta: 3465	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3465/8f2f34c69301f73a7aac01293ef777b1425d3659/index.js/clean/app/plugins/music_service/webradio/index.js