Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

There's literally no error handling in ArrowSetup.prototype.setup #225

Open
samlecuyer opened this issue Apr 11, 2014 · 5 comments
Open

Comments

@samlecuyer
Copy link

https://github.com/yahoo/arrow/blob/master/lib/util/arrowsetup.js#L27

cb(null, ...) ignores any error that happens.

@pranavparikh
Copy link

@samlecuyer
Thanks for pointing out.
Does this look ok - https://github.com/pranavparikh/arrow/blob/errorHandling/lib/util/arrowsetup.js ?
Do you have any other recommendations ?

@samlecuyer
Copy link
Author

@pranavparikh cb is never invoked with any parameters. That's a problem

@pranavparikh
Copy link

@samlecuyer
Something like ?

ArrowSetup.prototype.startArrowServer = function(cb) {

var self = this;
try {
    if (self.config.startArrowServer) {
        Servermanager.startArrowServer(function(arrowServerStarted) {
            if (arrowServerStarted === false) {
                self.logger.error('Failed to start Arrow Server. Exiting !!!');
                cb('Failed to start Arrow Server. Exiting !!!');
                return;
            }
            cb();
        });
    } 
}
catch(e) {
    cb(e);
}

};

@samlecuyer
Copy link
Author

@pranavparikh much better

@pranavparikh
Copy link

@samlecuyer
Thanks.I'll work on this and we can go through the changes once I'm done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants