Error mapping provides a way for mapping all trappable errors in PHP to the right place where they came from. One disadvantage of code rewritting is that we lose the vital information for debugging on error placement, as errors do not occur in the original file, but in the rewritten one. Error mapping is an attempt to alleviate this disadvantage, as not all errors are trappable in PHP, and therefore we're hardly capable of mapping these untrappable errors.
You can use an error handler of your own with the error mapping feature. The error mapping will override your error handler but will proxy the errors captured with the filenames and line numbers corrected.