How to use the raven.captureException function in raven

To help you get started, we’ve selected a few raven examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github datopian / data-cli / lib / utils / error.js View on Github external
await new Promise((resolve, reject) => {
      // Capture errors:
      Raven.captureException(err, (sendErr, eventId) => {
        // Once report is sent resolve the promise. However, we resolve it even
        // if it failed to send a report:
        resolve()
      })
    })
  }
github AdityaTD / PenguBot / src / PenguBot.js View on Github external
process.on("uncaughtException", err => {
    console.error(`uncaughtException:\n${err.stack}`);
    Raven.captureException(err);
});
github nodecg / nodecg / lib / server / index.js View on Github external
process.on('unhandledRejection', (reason, p) => {
		console.error('Unhandled Rejection at:', p, 'reason:', reason);
		Raven.captureException(reason);
	});
github Hydractify / kanna_kobayashi / src / structures / CommandHandler.ts View on Github external
{
				++failed;

				continue;
			}

			try
			{
				this.loadCommand(path, folder, file);
			}
			catch (error)
			{
				++failed;

				this.logger.error(`Error while loading ${join(path, folder, file)}`, error);
				captureException(error, {
					extra: {
						category: folder,
						commandName: file,
						path,
					},
				});
			}

		}

		this.logger.info(`Loaded ${files.length - failed} ${folder} commands.`);
	}
github billyvg / jsimport.nvim / rplugin / node / jsimport.js / src / logger.js View on Github external
message,
    level,
  });

  if (nvim) {
    if (level === 'error') {
      error(nvim, `${message}: ${err}`);
    } else if (level === 'warning') {
      warn(nvim, message);
    } else {
      echomsg(nvim, message);
    }
  }

  if (err) {
    Raven.captureException(err);
  }
};
github elementary / houston / src / lib / log.js View on Github external
report (err: Error, data: ?Object) {
    if (config.sentry != null) {
      Raven.captureException(err, data)
    }
  }
}
github lifechurch / melos / elaphros / decorators / raven-decorator.js View on Github external
function captureException(error, friendlyMessage = null, params = null) {
    fastify.log.error(`${friendlyMessage || ''} ${error.toString()}`)
    if (process.env.ELAPHROS_SENTRY_DSN) {
      raven.captureException(error, params)
    }
  }