Exception
; With set_error_handler
order PHP to throw our new exception whenever an error or warning occurs; and wrap all our code in try { … } catch () { … }
. In short, everything is as in the above article. Most of the time, I spent on formatting styles and images (which, by the way, are inserted using url-data; that is, my class turned out to be independent of external resources).Aero()->get_option(...)
replace the second parameter of the called method. (For example, Aero()->get_option('catch_errors', E_ALL, 'error_handler')
turns into just E_ALL
.)Source: https://habr.com/ru/post/30829/
All Articles