maestro-server/audit-app

View on GitHub
app/core/libs/db_run.js

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
'use strict';

const co = require('co');

/*
 * Run a generator function and print errors if any
 */
module.exports = function run(fn) {
    co(fn).catch(function (err) {
        console.error(err.toString());
    });
};