Node process always exits on assertion failure #107

Closed
Robdr opened this Issue Jun 11, 2012 · 1 comment

Comments

Projects
None yet
2 participants

Robdr commented Jun 11, 2012

My node process always exits when an assertion fails. See the code below, i couldn't get it to just emit an error:

var nodeio = require('node.io');

var testJob = {

    input: [1],

    run: function(page_number) {
        this.assert(false).equals(true);
    },

    fail: function(input, status) {
        console.log("Job failed " + input + " " + status);
        this.skip();
    }
}

function startJob(){
    nodeio.start(new nodeio.Job({},testJob), {}, function(err) {
        if (err) {
            console.log('error: ' + err);
        } else {
            console.log('job succeeded');
        }
        startJob();
    }, false);
}

startJob();
Contributor

chriso commented Jun 22, 2012

Fixed in the latest release.

chriso closed this in 3b2d36f Jun 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment