/** * This method, renderScreenOfDeath, would do it's best to try to render an error screen using the static method of * ERR::renderScreenOfDeath, which is the first non-abstract descendant CLASS that takes care of error reporting & handling; * * The name of the 'ERR' CLASS is subject to change, so THIS IS THE ONLY PLACE where the complex auto-loading, loose-coupling * RA PHP Framework is able to fail. Thus, the lack of knowledge that a parent object has over it's children, makes it quite * hard to output any kind of useful information unless statically called. THAT MEANS: that if the [ERR] CLASS changes its * name, you, the developer are obligated to change it here also. This can be done through a smart editor, like Eclipse PDT * to ensure that this kind of 'code refactoring' is done OK; * * By default, any error screen assumes the following: * <ol> * <li>geSHi and Firebug plugins work as expected;</li> * <li>ERROR_REPORTING_LEVEL is set to E_ALL;</li> * </ol> * * @return string Tries to render the 'Screen Of Death', or fails throwing an Exception, at least. * @param string $errFrom From what SOURCE did the error come from; * @param string $errString What's the error string we're interested in; * @param string $errTip Can we help the developer, by providing an error tip?! * @param string $debugErrString If we hava a PHP generated debugString, use it ... */ protected static function renderScreenOfDeath(S $errFrom, S $errString, S $errTip, S $debugErrString = NULL) { if (self::checkCanOutputErrorScreen()->toBoolean()) { // IF the 'ERR' CLASS exists; // IF the 'ERR' screen doesn't show-up sometime, this is __THE PLACE__ to search for errors; return ERR::renderScreenOfDeath($errFrom, $errString, $errTip, $debugErrString); } else { // Else, throw an even bigger error; throw new Exception(CANNOT_OUTPUT_ERROR_SCREEN); } }