Name

zError — Translates error number to string.


Library

Libz.lib


Synopsis

#include <zlib.h>
const char * zError(int err);


Return Value

The zError() function shall return a the string identifying the error associated with err, or NULL if err is not a valid error code.

It is unspecified if the string returned is determined by the setting of the LC_MESSAGES category in the current locale.


Detailed Description

The zError() function shall return the string identifying the error associated with err. This allows for conversion from error code to string for functions such as compress() and uncompress(), that do not always set the string version of an error.


Examples

To translate error number to string:

#include <stdio.h>
#include <zlib.h>

void Zerror( )
{
const char * str = zError(1);
printf("error message is %s",str);
}

Output

error message is "stream end".

Errors

None defined.


Feedback

For additional information or queries on this page send feedback


© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user.