Welcome Guest, Not a member yet? Register   Sign In
Error page in production (CI 3)
#2

I found a temp solution but I don't like it because I modified a file in system directory :

system/core/Common.php :

PHP Code:
function _exception_handler($exception)
 {
    $_error =& load_class('Exceptions''core');
    $_error->log_exception('error''Exception: '.$exception->getMessage(), $exception->getFile(), $exception->getLine());

    is_cli() OR set_status_header(500);
    // Should we display the error?
    if (str_ireplace(array('off''none''no''false''null'), ''ini_get('display_errors')))
    {
        $_error->show_exception($exception);
    }
    // *** new block ***
    if ( ENVIRONMENT=='production' ) {
        echo $_error->show_error("ERREUR SERVEUR""Une erreur est survenue !");
    }

    exit(1); // EXIT_ERROR

Is there a more conventional way ?
Reply


Messages In This Thread
Error page in production (CI 3) - by nico - 07-04-2024, 04:13 AM
RE: Error page in production (CI 3) - by nico - 07-04-2024, 05:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB