Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this question
Can you give an example of a Drupal error that you are talking about, or are you talking about a fatal PHP error? – MPD 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
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
up vote 4 down vote accepted

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

share|improve this answer
Thanks googletrop that's exactly what i meant. – silkAdmin Feb 11 '12 at 6:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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