src/index.js
function wrapCallback(pluginConfig, cb) {
	return (err, data) => {
		// Stop watchdog timers
		clearTimers();

		// If an error was thrown we'll report it to Sentry
		if (err && pluginConfig.captureErrors) {
			const Raven = pluginConfig.ravenClient;
			ravenInstalled && Raven.captureException(err, {}, () => {
				cb(err, data);
			});
		}
		else {
			cb(err, data);
		}
	};
}
function wrapCallback(pluginConfig, cb) {
	return (err, data) => {
		// Stop watchdog timers
		clearTimers();

		// If an error was thrown we'll report it to Sentry
		if (err && pluginConfig.captureErrors) {
			const Raven = pluginConfig.ravenClient;
			ravenInstalled && Raven.captureException(err, {}, () => {
				cb(err, data);
			});
		}
		else {
			cb(err, data);
		}
	};
}
function wrapCallback ( pluginConfig , cb ) { return ( err , data ) => { // Stop watchdog timers clearTimers ( ) ; // If an error was thrown we'll report it to Sentry if ( err && pluginConfig . captureErrors ) { const Raven = pluginConfig . ravenClient ; ravenInstalled && Raven . captureException ( err , { } , ( ) => { cb ( err , data ) ; } ) ; } else { cb ( err , data ) ; } } ; }
Wraps a given callback function with error logging

@param {Object} pluginConfig
@param {Function} cb - Callback function to wrap
@returns {Function}
Wraps a given callback function with error logging