protected function sys_get_errors()
    {
        $errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
        if (empty($errors)) {
            return "";
        }
        
        $message_array = [];
        
        foreach ($errors as $error) {
            $message_array[$error['message']] = $error['message'];
        }
        
        return implode("\n", $message_array);
    }