You are here

function fb_handle_exception in Drupal for Facebook 6.2

Same name and namespace in other branches
  1. 5.2 fb.module \fb_handle_exception()
  2. 6.3 fb.module \fb_handle_exception()

Exception handler for PHP5 exceptions.

1 string reference to 'fb_handle_exception'
fb_api_init in ./fb.module
Include the necessary facebook-platform code and initialize the API object.

File

./fb.module, line 829

Code

function fb_handle_exception($exception) {
  $message = t('Facebook API exception %message.  !trace', array(
    '%message' => $exception
      ->getMessage(),
    '!trace' => '<pre>' . $exception
      ->getTraceAsString() . '</pre>',
  ));
  watchdog('fb', $message, array(), WATCHDOG_ERROR);

  //drupal_set_message($message, 'error');
  print $message;
  print "<pre>\$_REQUEST:\n";
  print_r($_REQUEST);
  print "\n\nREQUEST_URI:\n" . request_uri();
  print "</pre>";
}