Learn R Programming

ergm (version 4.7.1)

ergm-errors: Sensible error and warning messages by ergm initializers

Description

These functions use traceback and pattern matching to find which ergm initializer caused the problem, and prepend this information to the specified message. They are not meant to be used by end-users, but may be useful to developers.

Usage

ergm_Init_abort(..., default.loc = NULL, call = NULL)

ergm_Init_stop(..., call. = FALSE, default.loc = NULL)

ergm_Init_warn(..., default.loc = NULL)

ergm_Init_warning(..., call. = FALSE, default.loc = NULL)

ergm_Init_inform(..., default.loc = NULL)

ergm_Init_message(..., default.loc = NULL)

ergm_Init_try(expr)

Arguments

...

Objects that can be coerced (via paste0()) into a character vector, concatenated into the message.

default.loc

Optional name for the source of the error, to be used if an initializer cannot be autodetected.

call., call

See stop() and abort() respectively; note the different defaults.

expr

Expression to be evaluated (in the caller's environment).

Functions

  • ergm_Init_try(): A helper function that evaluates the specified expression in the caller's environment, passing any errors to ergm_Init_stop().

See Also