writeErrors: Query or set whether DCOM errors are written to a file

View source: R/COMError.R

writeErrorsR Documentation

Query or set whether DCOM errors are written to a file

Description

This function allows one to control whether DCOM diagnostic information and errors are written to a file. This is helpful for debugging. We can now specify the path to the file to which these messages are written and also pause/suspend and reenable logging these messages.

Usage

writeErrors(val = logical())

Arguments

val

the full path to a file name in which to log messages. This may exist in which case messages will be apppended. If it doesn't exist, it will be created. If no value is specified, the function queries the current logical value controlling whether DCOM errors are written to a file.

Value

If called with no arguments or an empty vector, the return is a a logical value (i.e. vector of length 1) indicating the value of the boolean flag before the function was called. If called with a file name, that value is returned. If called with TRUE, the name of a file in R's temporary directory is returned and this is the file name to which the messages are written. If called with FALSE, the value of boolean flag before this call is returned.

Author(s)

Duncan Temple Lang

Examples

  old = writeErrors()
  f = writeErrors(TRUE)
  writeErrors()
  # next, suspend writing
  writeErrors(FALSE)
  # now reenable writing
  writeErrors(f)
  readLines(f)

omegahat/RDCOMClient documentation built on July 24, 2022, 5:45 a.m.