trigger_error() can not be used for informing users about fatal errors because it may not be displayed at all, it can be used only for debugging purposes
I think it should be better to use debugging() + error_log() instead in some cases
You can test it with following, it results in white page of death:
We should not use trigger_error() before setting our error levels too because it leaks sensitive information.
Current default exception handler logs every print_error() in minimal debug mode.