You are here

function rules_handle_error_msg in Rules 6

Handles a error message. If the user has permission to administer the rules engine, show him the error. Otherwise just log it.

2 calls to rules_handle_error_msg()
rules_admin_overview_table in rules_admin/rules_admin.inc
Returns a table of rules filtered by the given parameters
rules_show_log in rules/rules.module
Shows the log and clears it afterwards

File

rules/rules.module, line 905
Rules engine module

Code

function rules_handle_error_msg($message, $variables, $rule_name = NULL) {
  if (user_access('administer rules')) {
    drupal_set_message(t($message, $variables), 'error');
  }
  $link = isset($rule_name) ? l(t('Show rule configuration'), PATH . '/' . $rule_name) : NULL;
  watchdog('rules', $message, $variables, WATCHDOG_ERROR, $link);
}