Skip to content

Commit

Permalink
error events should not be raised when using promises that could be c…
Browse files Browse the repository at this point in the history
…aught
  • Loading branch information
timgit committed May 28, 2016
1 parent 2134013 commit 9628500
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,15 @@ class Manager extends EventEmitter {
resolve(null);
}
})
.catch(error => {
self.emit('error', error);
reject(error);
});
.catch(error => reject(error));
}

}

}

completeJob(id){
let values = [id];

return this.db.executeSql(this.completeJobCommand, values)
.catch(error => {
this.emit('error', error);
throw error;
});
return this.db.executeSql(this.completeJobCommand, [id]);
}
}

Expand Down

0 comments on commit 9628500

Please sign in to comment.