Skip to content

Commit 67c6563

Browse files
committed
Error capturing
1 parent 08503cf commit 67c6563

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/taskmaster.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,16 @@ const errorQ = 'error_queue'
2222
mkdir('-p', config.RUNBOX.DIR)
2323

2424
amqp.connect(`amqp://${config.AMQP.USER}:${config.AMQP.PASS}@${config.AMQP.HOST}:${config.AMQP.PORT}`, (err, connection: Connection) => {
25-
if (err) throw err
25+
if (err) {
26+
Raven.captureException(err);
27+
return;
28+
}
2629

2730
connection.createChannel((err2, channel) => {
31+
if (err2) {
32+
Raven.captureException(err2);
33+
return;
34+
}
2835

2936
channel.assertQueue(successQ);
3037
channel.assertQueue(jobQ);

0 commit comments

Comments
 (0)