rfc:stackable_error_handler
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | rfc:stackable_error_handler [2013/04/18 06:23] – todo tyrael | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PHP RFC: Stackable Error Handlers ====== | ||
+ | * Version: 0.1 | ||
+ | * Date: 2013-03-20 | ||
+ | * Author: Ferenc Kovács, tyra3l@gmail.com | ||
+ | * Status: Draft | ||
+ | * First Published at: https:// | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | This RFC tries to address the couple of feedback and possible shortcomings of the current error handler infrastructure, | ||
+ | |||
+ | ===== Proposal ===== | ||
+ | |||
+ | There would be a built-in error handler set, which implements the current behavior: | ||
+ | - log the errors based on the config (error_reporting, | ||
+ | - display the errors based on the config. | ||
+ | - provides the $php_errormsg based on the config | ||
+ | - this handler is defined for E_ALL | ||
+ | |||
+ | When you call set_error_handler using the old signature the the error handler will replace/ | ||
+ | For example: | ||
+ | 1. built-in E_ALL | ||
+ | |||
+ | set_error_handler(function($errno, | ||
+ | 1. built-in E_ALL | ||
+ | 2. old-style E_WARNING | ||
+ | |||
+ | set_error_handler(function($errno, | ||
+ | 1. built-in E_ALL | ||
+ | 2. old-style #2 E_NOTICE | ||
+ | |||
+ | |||
+ | The new stackable error handling would only generate and pass the error to the chain of handlers if there is at least one error handler set for that particular error type. | ||
+ | |||
+ | |||
+ | ===== Backward Incompatible Changes ===== | ||
+ | |||
+ | What breaks, and what is the justification for it? | ||
+ | |||
+ | ===== Proposed PHP Version(s) ===== | ||
+ | |||
+ | PHP 5.6 (or next major, if we happen to release a major version after 5.5). | ||
+ | |||
+ | ===== SAPIs Impacted ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== New Constants ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== php.ini Defaults ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Open Issues ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Unaffected PHP Functionality ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Future Scope ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Proposed Voting Choices ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Patches and Tests ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | TODO | ||
+ | |||
+ | ===== Rejected Features ===== | ||
+ | |||
+ | TODO |
rfc/stackable_error_handler.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1