packages/opal-node-pdfreader/pdfreader.js
function sendError(node, msg, err, ...attrs) {
        if (check.string(err)) {
            msg.error = {
                node: node.name,
                message: util.format(err, ...attrs),
            };
        } else if (check.instance(err, Error)) {
            msg.error = err;
        }
        node.error(node.name + ': ' + msg.error.message, msg);
    }
function sendError(node, msg, err, ...attrs) {
        if (check.string(err)) {
            msg.error = {
                node: node.name,
                message: util.format(err, ...attrs),
            };
        } else if (check.instance(err, Error)) {
            msg.error = err;
        }
        node.error(node.name + ': ' + msg.error.message, msg);
    }
function sendError ( node , msg , err , ... attrs ) { if ( check . string ( err ) ) { msg . error = { node : node . name , message : util . format ( err , ... attrs ) , } ; } else if ( check . instance ( err , Error ) ) { msg . error = err ; } node . error ( node . name + ': ' + msg . error . message , msg ) ; }
sends Error back to node-red
@function
@param {object} node - the node object returned by createNode
@param {object} msg - msg object passed as input to this node.
@param {object} err - error object.
@param {object} attrs - attrs to be used to construct error message.
sends Error back to node - red