You are here

function fb_log_exception in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.3 fb.module \fb_log_exception()
  2. 6.2 fb.module \fb_log_exception()
  3. 7.4 fb.module \fb_log_exception()
  4. 7.3 fb.module \fb_log_exception()
9 calls to fb_log_exception()
fb_actions_profile_fbml in ./fb_actions.module
fb_app_get_app_properties in ./fb_app.module
Get properties from Facebook. Fills in the data that we need to know by querying facebook.
fb_app_set_app_properties in ./fb_app.module
fb_app_user in ./fb_app.module
Implementation of hook_user.
fb_connect_user in ./fb_connect.module
Implementation of hook_user

... See full list

File

./fb.module, line 654

Code

function fb_log_exception($e, $text = '', $fb = NULL) {
  if ($text) {
    $message = $text . ': ' . $e
      ->getMessage();
  }
  else {
    $message = $e
      ->getMessage();
  }
  $message .= ' ' . $e
    ->getCode();
  if ($fb) {
    $message .= '. (' . t('logged into facebook as %fbu', array(
      '%fbu' => $fb
        ->get_loggedin_user(),
    )) . ')';
  }
  if (fb_verbose()) {
    $message .= '<pre>' . $e . '</pre>';
  }
  watchdog('fb', $message, WATCHDOG_ERROR);
  if (user_access('administer fb apps')) {
    drupal_set_message($message, 'error');
  }
}