Testing code that generates warnings
Our code base has a lot of code that looks like this:
<?php try { $this->doScaryThing(); } catch(Exception $e) { trigger_error("Downgraded: " . get_class($e) . ":" . $e->getMessage(), E_USER_WARNING); } Or sometimes trigger_error is used as a way to log other thigns.
Nov 21, 2019