How to edit the message (Fatal error: Maximum execution time of 30 seconds exceeded)

0

Whenever there is a slow response from the server this message is displayed, but it is not formatted and it skips from the layout pattern of my application.

I would like to know if you can edit this message or treat it, like modifying font color, things like that.

    
asked by anonymous 10.06.2017 / 15:31

1 answer

0

You can not edit this message, but you can capture the fatal error using register_shutdown_function and error_get_last and treat it differently.

<?php

function onShutdown() {
    $lastError = error_get_last();
    if ($error['type'] == E_ERROR) {
        // Retornar seu template com erro
    }
}

register_shutdown_function('onShutdown');

You will probably have to change your% of% to not display errors with php.ini as well.

    
10.06.2017 / 22:12