You are here

function fb_handle_exception in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.3 fb.module \fb_handle_exception()
  2. 6.2 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 676

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, WATCHDOG_ERROR);

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