src/support/secret.js
function handle (fn) {
	return function (...args) {
		return new Promise((resolve) => {
			fn.bind(this)(...args, function (err, result) {
				/* istanbul ignore if */
				if (err) {
					debug(err);
				} else {
					resolve(result);
				}
			});
		});
	};
}
function handle (fn) {
	return function (...args) {
		return new Promise((resolve) => {
			fn.bind(this)(...args, function (err, result) {
				/* istanbul ignore if */
				if (err) {
					debug(err);
				} else {
					resolve(result);
				}
			});
		});
	};
}
function handle ( fn ) { return function ( ... args ) { return new Promise ( ( resolve ) => { fn . bind ( this ) ( ... args , function ( err , result ) { /* istanbul ignore if */ if ( err ) { debug ( err ) ; } else { resolve ( result ) ; } } ) ; } ) ; } ; }
If an error happes send it to debug function.
If an error happes send it to debug function .