docloop-error-handling.js
function catchAsyncErrors(fn) {
	return 	async (...args) => {
				try{		await Promise.resolve(fn(...args)).catch(args[2])}
				catch(e){	args[2](e) }
			}
}
function catchAsyncErrors(fn) {
	return 	async (...args) => {
				try{		await Promise.resolve(fn(...args)).catch(args[2])}
				catch(e){	args[2](e) }
			}
}
function catchAsyncErrors ( fn ) { return async ( ... args ) => { try { await Promise . resolve ( fn ( ... args ) ) . catch ( args [ 2 ] ) } catch ( e ) { args [ 2 ] ( e ) } } }
Wrapper for express request handlers to catch rejected promises or async methods.

@memberof module:docloop

@param  {Function}	fn		Express request handler to wrap

@return {Function}			Wrapped request handler
Wrapper for express request handlers to catch rejected promises or async methods .