How to avoid the error popup from check completeness?

Submitted by: Brent Hartwig Last Updated: 2006-09-20

How to use the execute function in order to supress the error popup from the check_completeness command

function LogCompletenessCheck( doc, logFilename ) { local logged = 0; # Change doc focus local savedDoc = current_doc; if ( savedDoc != doc ) { current_doc( doc ); }   local win = doc_window( doc ); # used below # May wish to remove this check, always logging results. if ( doc_incomplete( doc ) ) { # Avoid overwrite file prompt by first deleting specified log file. if ( file_size( logFilename ) != -1 ) { remove_file "$logFilename"; }       # Direct completeness check results to given filename. local cmd = "cc -full output='". logFilename. "'";       execute( cmd ); # ignore return, see below. # Consider operation successful if file now exists. The # execute is returning 1 even when operation is successful. logged = ( file_size( logFilename ) != -1 ); # Update user; alternatively, set message to " " clearing cc's message. if ( win >= 0 ) { if ( logged ) { window_set( win, "message", \                 "Completeness results logged to \"$logFilename\"." ); } else { if ( length( main::ERROR ) ) { window_set( win, "message", main::ERROR ); } else { window_set( win, "message", \                    "Failed to log completeness results to \"$logFilename\"." ); }           }        }    } else { if ( win >= 0 ) { window_set( win, "message", "No completeness errors to log."); }   }    # Restore doc focus if ( savedDoc != current_doc ) { current_doc( savedDoc ); }   return logged; }
 * 1) Logs the completeness check results for the document of the given ID
 * 2) to the specified filename. Only logs results if there are completeness
 * 3) errors. In such a case, 1 is returned when successful. 0 means no
 * 4) completeness errors or error encountered. This function will attempt
 * 5) to first delete the specified file (without the "r" and "f" flags).