You are here

function _pmpermission_watchdog_log in Drupal PM (Project Management) 7.2

Log and display the error.

Parameters

string $error: Error to report.

bool $backtrace: TRUE if watchdog log should include full backtrace of the error.

2 calls to _pmpermission_watchdog_log()
pmpermission_get_parent_nid_of_node in pmpermission/pmpermission.module
Recursively hunts and find out the first parent node of given type.
_pmpermission_get_assigned_id in pmpermission/pmpermission.module
Should recursively hunt for a particular parent and get its id.

File

pmpermission/pmpermission.module, line 791
Main module file for the pmpermission module.

Code

function _pmpermission_watchdog_log($error, $backtrace = TRUE) {
  $err_msg = t("Error message: %error", array(
    '%error' => $error,
  ));
  watchdog('PHP', $err_msg, WATCHDOG_ERROR);
  drupal_set_message($err_msg, 'error');
}