How to use the error function from tracer

Find comprehensive JavaScript tracer.error code examples handpicked from public code repositorys.

24
25
26
27
28
29
30
31
32
33
      return true;
    };
  }
}, function(err, results) {
  if (err) {
    logger.error(err);
    callback(err);
  };
  if (results.dataFile) {
    self.cleanFiles.push(results.dataFile);
fork icon25
star icon59
watch icon6

+ 23 other calls in file

60
61
62
63
64
65
66
67
68
69
const readFileList = require('./modules/readFileList');
const urlsRoot = path.join(__dirname, '..', 'urls.txt'); // 百度链接推送文件
const DOMAIN = process.argv.splice(2)[0]; // 获取命令行传入的参数

if (!DOMAIN) {
  logger.error('请在运行此文件时指定一个你要进行百度推送的域名参数,例:node utils/baiduPush.js https://xugaoyi.com')
  return
}

main();
fork icon918
star icon0
watch icon35

410
411
412
413
414
415
416
417
418
419
  // Are we expecting this block?
  if(block === (blockNr % 0x100)) {
    current_block = blockData.slice(3, blockData.length-checksum_length);
  }
  else {
    log.error('ERROR: Synch issue! Received: ' + block + ' Expected: ' + blockNr);
    return;
  }
}
else {
fork icon5
star icon11
watch icon3

+ 3 other calls in file

492
493
494
495
496
497
498
499
500
501
  click: async () => {
      logger.debug('SaveEdit clicked...')
      try {
        await saveEdit(mainWindow)
      } catch (e) {
        logger.error(e.message)
      }
    }
},
{ type: 'separator' },
fork icon0
star icon5
watch icon2

+ 3 other calls in file

225
226
227
228
229
230
231
232
233
234
try {
  await waitOn(opts)
  return 'server ready'
} catch (e) {
  // return e.name + ': ' + e.message
  logger.error(`checkPort: failed ${_ + 1} - ${e.name}: ${e.message}`)
  if (_ >= 4) {
    throw e
  } else {
    // try to rerun deepl_scraper_pp2.run_uvicorn
fork icon1
star icon3
watch icon3

+ 20 other calls in file

148
149
150
151
152
153
154
155
156
157
  logger.log(classNum)
  logger.log('we dealing with '+a+' out of '+outOf )
  client.query("INSERT INTO classes VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)", paramas, function(err, result) {
    if(err) {
       err["Error"] = true;
       logger.error('error running query2', err);
    }
  })
}
allInst = function(callback){
fork icon0
star icon1
watch icon2

294
295
296
297
298
299
300
301
302
303
//
//                                        callback(formatAndStreamArray)
//                                    })
//                                }
//                            }).catch(function (e) {
//                                logger.error(e);
//                            })
//                        }
//                    }).catch(function (e) {
//                        logger.error(e)
fork icon0
star icon1
watch icon1

398
399
400
401
402
403
404
405
406
407
try {
  ch.sendToQueue(q, new Buffer(trama), {persistent: true});
  log.debug(" [x] Sent trama to rabbitMQ");
  ais_queue.info(trama);
} catch (err) {
  log.error("ERROR AL METER EN LA COLA: "+err);
  if (conn != undefined) {
    conn.close();
  }
}
fork icon0
star icon0
watch icon1

296
297
298
299
300
301
302
303
304
305
});

EAU.check(function (error, last, body) {
  if (error) {
    if (error === 'no_update_available') { return false; }
    logger.error('API Error: %j', error)
    return false
  } else {
    if (body !== undefined) {
      const options = {
fork icon0
star icon0
watch icon1

29
30
31
32
33
34
35
36
37
38
        /* Log only Internal Server Error */
        Tracer.error("Internal Server Error: %j", error)
    }
} catch(Err) {
    /* Log Error */
    Tracer.error("loaders/error: %j", (typeof Err === "string" ? {message: Err} : Err))
}

/* Reply with custom error */
reply.code(oResponse.statusCode).send(oResponse)
fork icon0
star icon0
watch icon1

59
60
61
62
63
64
65
66
67
68
 * @returns
 */
const accept = (req, res, next) => {
  const userId = getUserId(req);
  if (!userId) {
    log.error('accept.no-user');
    next(new Error('accept.no-user'));
    return;
  }

fork icon0
star icon0
watch icon0

+ 5 other calls in file