I thought about this... But how would you know where the error belongs (an
update, create or delete)? (Perhaps it is irrelevant) In events, how is
this handled by default? Is not imporant to know "I was about to call
create function but got an error"?


2013/4/10 Tomas Neme <notifications@github.com>

> In drivers/playlists/mongo-driver.js:
>
> > -                if( err ) {
> > -                    console.log(err);
> > -                } else if( sched ) {
> > -                    console.log("Processing sched:", sched);
> > -                    self.createPlaylist(sched, self.newPlaylistCallback);
> > -                } else {
> > -                    console.log('Done');
> > -                }
> > -            });
> > +        var boundaries = self.setBoundaries(from, to);
> > +        self.scheds.findItems({
> > +            start: { $lte: boundaries.to.unix()},
> > +            end: { $gte: boundaries.from.unix() }
> > +        }, function(err, scheds) {
> > +            if( err ) {
> > +                console.log(err);
>
> I'm not sure there should be different error handlers. Also, remember
> we're migrating that to events, so it'll probably end up just as
>
> driver.on('create', function(playlist){})driver.on('update', function(playlist){})driver.on('error', function(err){}) // this probably will just call the error driver and send a message to caspa
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/inaes-tic/mbc-mosto/pull/38/files#r3746529>
> .
>