src/DataTable.php
public static function sendFatal($error, $toSend = null)
    {
        $toJson = ['error' => utf8_encode($error)];
        if (isset($toSend)) {
            $toJson = array_merge($toSend, $toJson);
        }

        exit(json_encode($toJson));
    }
public static function sendFatal($error, $toSend = null)
    {
        $toJson = ['error' => utf8_encode($error)];
        if (isset($toSend)) {
            $toJson = array_merge($toSend, $toJson);
        }

        exit(json_encode($toJson));
    }
public static function sendFatal ( $ error , $ toSend = null ) { $ toJson = [ 'error' => utf8_encode ( $ error ) ] ; if ( isset ( $ toSend ) ) { $ toJson = array_merge ( $ toSend , $ toJson ) ; } exit ( json_encode ( $ toJson ) ) ; }
Throw a fatal error.
This writes out an error message in a JSON string which DataTables will
see and show to the user in the browser.

@param string $error  Message to send to the client
@param array  $toSend Others informations to transfer
Throw a fatal error . This writes out an error message in a JSON string which DataTables will see and show to the user in the browser .