Generate Errors

Categories

Component ID

2068539

Component name

Generate Errors

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

8645

Component created

Component changed

Component body

Ever think to yourself, "I wish I had a way to crash my site?" "Do I know exactly how my server will respond in error conditions?" "I haven't seen a E_STRICT error, I wonder what that looks like?" Wonder no longer.

Generate Errors is a module that provides an user interface for developer to manually generate errors. A developer can intentionally:

  • Select or manually specify HTTP status code in the response header and optionally exit
  • Throw an uncaught PHP Exception
  • Exhaust memory in an infinite loop
  • Trigger a PHP error level, including E_ERROR, E_WARNING, E_PARSE, E_NOTICE, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_STRICT, and E_RECOVERABLE_ERROR
  • Benchmark PHP execution in error conditions

The selected error will occur only once, allowing a developer or systems administrator to test system behaviors, such as custom error messages from the server and so forth. A status message will be shown describing the generated error, and a log message will be recorded in watchdog prior to the triggered error to document who did what and when.

This module should not be deployed in any public-facing environment and is intended for development and testing purposes only.