Improve error message when drupal_handle_request() fails

Created on 3 August 2013, about 11 years ago
Updated 2 July 2024, 4 months ago

Over at #1872522: Compiled data in PHP storage is cleared too late in drupal_flush_all_caches() , a try/catch was added around drupal_handle_request() in index.php, which broadly catches any exceptions that happen and spits out an error message.

Right now that message is:

If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild

However, this doesn't follow the standard guidelines for an error message, which should include:

  • What happened and why?
  • What is the end result for the user?
  • What can the user do to prevent it from happening again?

It's a bit tricky, though, because there are any number of things that could've happened here. It could be because the service container didn't compile right. It could be that code has in fact changed on disk, as the error message says. Or, it could be that some other random exception way down the stack never got caught by anything and bubbles up because the catch is so promiscuous.

But in any event, we should improve the message a bit, because it's not actually telling people what's going on here, just sending them off to a page in the handbook.

📌 Task
Status

Closed: outdated

Version

11.0 🔥

Component
Documentation 

Last updated about 14 hours ago

No maintainer
Created by

🇨🇦Canada webchick Vancouver 🇨🇦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024