
Wmerrors allows for customizing how PHP errors are handled and displayed to the user. It is specifically designed for situations where userland code is insufficient (e.g. out of memory errors), but stacktraces and logging are still needed.
wmerrors is designed for usage in MediaWiki, but it has no dependency upon MediaWiki and can be used standalone.