error: Polish human-readable error descriptions
Also put error definitions in alphabetical order
This commit is contained in:
		
							parent
							
								
									cde0fc7544
								
							
						
					
					
						commit
						fc5469d87b
					
				
							
								
								
									
										28
									
								
								qerror.c
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								qerror.c
									
									
									
									
									
								
							@ -46,43 +46,39 @@ static const QErrorStringTable qerror_table[] = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_DEVICE_ENCRYPTED,
 | 
					        .error_fmt = QERR_DEVICE_ENCRYPTED,
 | 
				
			||||||
        .desc      = "The %(device) is encrypted",
 | 
					        .desc      = "Device '%(device)' is encrypted",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_DEVICE_LOCKED,
 | 
					        .error_fmt = QERR_DEVICE_LOCKED,
 | 
				
			||||||
        .desc      = "Device %(device) is locked",
 | 
					        .desc      = "Device '%(device)' is locked",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_DEVICE_NOT_ACTIVE,
 | 
					        .error_fmt = QERR_DEVICE_NOT_ACTIVE,
 | 
				
			||||||
        .desc      = "The %(device) device has not been activated by the guest",
 | 
					        .desc      = "Device '%(device)' has not been activated by the guest",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_DEVICE_NOT_FOUND,
 | 
					        .error_fmt = QERR_DEVICE_NOT_FOUND,
 | 
				
			||||||
        .desc      = "The %(device) device has not been found",
 | 
					        .desc      = "Device '%(device)' not found",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_DEVICE_NOT_REMOVABLE,
 | 
					        .error_fmt = QERR_DEVICE_NOT_REMOVABLE,
 | 
				
			||||||
        .desc      = "Device %(device) is not removable",
 | 
					        .desc      = "Device '%(device)' is not removable",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_FD_NOT_FOUND,
 | 
					        .error_fmt = QERR_FD_NOT_FOUND,
 | 
				
			||||||
        .desc      = "Failed to find file descriptor named %(name)",
 | 
					        .desc      = "File descriptor named '%(name)' not found",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_FD_NOT_SUPPLIED,
 | 
					        .error_fmt = QERR_FD_NOT_SUPPLIED,
 | 
				
			||||||
        .desc      = "No file descriptor supplied via SCM_RIGHTS",
 | 
					        .desc      = "No file descriptor supplied via SCM_RIGHTS",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        .error_fmt = QERR_OPEN_FILE_FAILED,
 | 
					 | 
				
			||||||
        .desc      = "Could not open '%(filename)'",
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_INVALID_BLOCK_FORMAT,
 | 
					        .error_fmt = QERR_INVALID_BLOCK_FORMAT,
 | 
				
			||||||
        .desc      = "Invalid block format %(name)",
 | 
					        .desc      = "Invalid block format '%(name)'",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_INVALID_PARAMETER,
 | 
					        .error_fmt = QERR_INVALID_PARAMETER,
 | 
				
			||||||
        .desc      = "Invalid parameter %(name)",
 | 
					        .desc      = "Invalid parameter '%(name)'",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_INVALID_PARAMETER_TYPE,
 | 
					        .error_fmt = QERR_INVALID_PARAMETER_TYPE,
 | 
				
			||||||
@ -90,7 +86,7 @@ static const QErrorStringTable qerror_table[] = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_INVALID_PASSWORD,
 | 
					        .error_fmt = QERR_INVALID_PASSWORD,
 | 
				
			||||||
        .desc      = "The entered password is invalid",
 | 
					        .desc      = "Password incorrect",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_JSON_PARSING,
 | 
					        .error_fmt = QERR_JSON_PARSING,
 | 
				
			||||||
@ -102,7 +98,11 @@ static const QErrorStringTable qerror_table[] = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_MISSING_PARAMETER,
 | 
					        .error_fmt = QERR_MISSING_PARAMETER,
 | 
				
			||||||
        .desc      = "Parameter %(name) is missing",
 | 
					        .desc      = "Parameter '%(name)' is missing",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        .error_fmt = QERR_OPEN_FILE_FAILED,
 | 
				
			||||||
 | 
					        .desc      = "Could not open '%(filename)'",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        .error_fmt = QERR_QMP_BAD_INPUT_OBJECT,
 | 
					        .error_fmt = QERR_QMP_BAD_INPUT_OBJECT,
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								qerror.h
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								qerror.h
									
									
									
									
									
								
							@ -66,9 +66,6 @@ QError *qobject_to_qerror(const QObject *obj);
 | 
				
			|||||||
#define QERR_FD_NOT_SUPPLIED \
 | 
					#define QERR_FD_NOT_SUPPLIED \
 | 
				
			||||||
    "{ 'class': 'FdNotSupplied', 'data': {} }"
 | 
					    "{ 'class': 'FdNotSupplied', 'data': {} }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define QERR_OPEN_FILE_FAILED \
 | 
					 | 
				
			||||||
    "{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define QERR_INVALID_BLOCK_FORMAT \
 | 
					#define QERR_INVALID_BLOCK_FORMAT \
 | 
				
			||||||
    "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }"
 | 
					    "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -90,18 +87,21 @@ QError *qobject_to_qerror(const QObject *obj);
 | 
				
			|||||||
#define QERR_MISSING_PARAMETER \
 | 
					#define QERR_MISSING_PARAMETER \
 | 
				
			||||||
    "{ 'class': 'MissingParameter', 'data': { 'name': %s } }"
 | 
					    "{ 'class': 'MissingParameter', 'data': { 'name': %s } }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define QERR_OPEN_FILE_FAILED \
 | 
				
			||||||
 | 
					    "{ 'class': 'OpenFileFailed', 'data': { 'filename': %s } }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define QERR_QMP_BAD_INPUT_OBJECT \
 | 
					#define QERR_QMP_BAD_INPUT_OBJECT \
 | 
				
			||||||
    "{ 'class': 'QMPBadInputObject', 'data': { 'expected': %s } }"
 | 
					    "{ 'class': 'QMPBadInputObject', 'data': { 'expected': %s } }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define QERR_SET_PASSWD_FAILED \
 | 
					#define QERR_SET_PASSWD_FAILED \
 | 
				
			||||||
    "{ 'class': 'SetPasswdFailed', 'data': {} }"
 | 
					    "{ 'class': 'SetPasswdFailed', 'data': {} }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define QERR_UNDEFINED_ERROR \
 | 
					 | 
				
			||||||
    "{ 'class': 'UndefinedError', 'data': {} }"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define QERR_TOO_MANY_FILES \
 | 
					#define QERR_TOO_MANY_FILES \
 | 
				
			||||||
    "{ 'class': 'TooManyFiles', 'data': {} }"
 | 
					    "{ 'class': 'TooManyFiles', 'data': {} }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define QERR_UNDEFINED_ERROR \
 | 
				
			||||||
 | 
					    "{ 'class': 'UndefinedError', 'data': {} }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define QERR_VNC_SERVER_FAILED \
 | 
					#define QERR_VNC_SERVER_FAILED \
 | 
				
			||||||
    "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"
 | 
					    "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user