Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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
1  
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
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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.