function findError(args) {
    let err;
    if (args) {
        if (args.length === 1) {
            return args[0];
        }
        for (let i = 0; i < args.length; i++) {
            const arg = args[i];
            if (isErrorOrDOMErrorOrDOMException(arg)) {
                return arg;
            } else if (arg && typeof arg.message === 'string') {
                err = arg;
            }
        }
    }
    return err;
}
/**
 * Finds the error argument.  This is useful because some WebSQL callbacks
 * pass the error as the first argument, and some pass it as the second argument.
 * @param {array} args
 * @returns {Error|DOMException|undefined}
 */
Finds the error argument.  This is useful because some WebSQL callbacks
pass the error as the first argument, and some pass it as the second argument.
@param {array} args
@returns {Error|DOMException|undefined}
Finds the error argument . This is useful because some WebSQL callbacks pass the error as the first argument and some pass it as the second argument . @param { array } args @returns { Error|DOMException|undefined }
function findError(args) {
    let err;
    if (args) {
        if (args.length === 1) {
            return args[0];
        }
        for (let i = 0; i < args.length; i++) {
            const arg = args[i];
            if (isErrorOrDOMErrorOrDOMException(arg)) {
                return arg;
            } else if (arg && typeof arg.message === 'string') {
                err = arg;
            }
        }
    }
    return err;
}
function findError ( args ) { let err ; if ( args ) { if ( args . length === 1 ) { return args [ 0 ] ; } for ( let i = 0 ; i < args . length ; i ++ ) { const arg = args [ i ] ; if ( isErrorOrDOMErrorOrDOMException ( arg ) ) { return arg ; } else if ( arg && typeof arg . message === 'string' ) { err = arg ; } } } return err ; }
Finds the error argument.
Finds the error argument .