4

Whenever Drupal encounters an unrecoverable error, it displays an error message.

Is there a way I can provide a template for this page?

  • 1
    Can you give an example of a Drupal error that you are talking about, or are you talking about a fatal PHP error? – mpdonadio Jan 27 '12 at 14:32
  • Are you missing gramatical php marks like a semi-colon, comma or quotations? – chrisjlee Jan 27 '12 at 17:37
  • 1
    He's talking about exceptions which are thrown and caught. This could be PDO exceptions (database error) or entity wrapper exceptions and a host of other exceptions which are caught and Drupal show an fatal error page. – googletorp Jan 27 '12 at 18:15
4

The closest thing you come by is the maintenance-page.tpl.php, It doesn't cover all cases, but if things go wrong but not that wrong that Drupal can't post a page, it uses maintenance-page.tpl.php to display the error(s).

The error itself is displayed using drupal_set_message

  • And for Drupal 8 this would be something like maintenance-page.twig ? Do you know? – therobyouknow Mar 7 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.