You are here

function _pdf_export_error in PDF Export 7

Sends an error message at pdf generation.

1 call to _pdf_export_error()
pdf_export_render in ./pdf_export.module
Handle the html as PDF.

File

./pdf_export.module, line 199
PDF Export module.

Code

function _pdf_export_error($message) {
  drupal_add_http_header('Status', '500 Internal Server Error', FALSE);
  watchdog('pdf_export', $message, array(), WATCHDOG_ERROR, current_path());
  drupal_json_output((object) array(
    'errorMessage' => $message,
  ));
  drupal_exit();
}