You are here

function fb_log_exception in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 5.2 fb.module \fb_log_exception()
  2. 6.3 fb.module \fb_log_exception()
  3. 7.4 fb.module \fb_log_exception()
  4. 7.3 fb.module \fb_log_exception()
11 calls to fb_log_exception()
fb_admin_get_app_properties in ./fb.admin.inc
Get properties from Facebook. Fills in the data that we need to know by querying facebook.
fb_admin_set_app_properties in ./fb.admin.inc
fb_api_init in ./fb.module
Include the necessary facebook-platform code and initialize the API object.
fb_app_set_app_properties in ./fb_app.admin.inc
Sets callback URLs and other properties of a facebook app. Calls the facebook
fb_app_user in ./fb_app.module
Implementation of hook_user.

... See full list

File

./fb.module, line 807

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, array(), WATCHDOG_ERROR);
  if (user_access(FB_PERM_ADMINISTER)) {
    drupal_set_message($message, 'error');
  }
}