protected function _error($message, $code)
    {
        header("HTTP/1.0 {$code} {$message}");
        echo $message;

        TableRegistry::get('Field.FieldInstances')->connection()->disconnect();
        exit(0);
    }
protected function _error($message, $code)
    {
        header("HTTP/1.0 {$code} {$message}");
        echo $message;

        TableRegistry::get('Field.FieldInstances')->connection()->disconnect();
        exit(0);
    }
protected function _error ( $ message , $ code ) { header ( "HTTP/1.0 {$code} {$message}" ) ; echo $ message ; TableRegistry :: get ( 'Field.FieldInstances' ) -> connection ( ) -> disconnect ( ) ; exit ( 0 ) ; }
Sends a JSON message error.

@param string $message The message
@param int $code A unique code identifier for this message
@return void Stops scripts execution
Sends a JSON message error .