jstests/concurrency/fsm_workload_helpers/auto_retry_transaction.js
/**
     * Calls 'func' with the print() function overridden to be a no-op.
     *
     * This function is useful for silencing JavaScript backtraces that would otherwise be logged
     * from doassert() being called, even when the JavaScript exception is ultimately caught and
     * handled.
     */
Calls 'func' with the print() function overridden to be a no-op.
This function is useful for silencing JavaScript backtraces that would otherwise be logged
from doassert() being called, even when the JavaScript exception is ultimately caught and
handled.
Calls ' func ' with the print () function overridden to be a no - op . This function is useful for silencing JavaScript backtraces that would otherwise be logged from doassert () being called even when the JavaScript exception is ultimately caught and handled .
function quietly(func) {
        const printOriginal = print;
        try {
            print = Function.prototype;
            func();
        } finally {
            print = printOriginal;
        }
    }
function quietly ( func ) { const printOriginal = print ; try { print = Function . prototype ; func ( ) ; } finally { print = printOriginal ; } }
Calls 'func' with the print() function overridden to be a no-op.
Calls ' func ' with the print () function overridden to be a no - op .