NSPR Reference Previous Contents |
Error Type
Error Functions
Error Codes
PR_GetError
. You can also set your
own errors using PR_SetError
.
#include <prerror.h>
typedef PRInt32 PRErrorCode
For NSPR errors, see Error Codes.
PR_SetError
PR_SetErrorText
PR_GetError
PR_GetOSError
PR_GetErrorTextLength
PR_GetErrorText
#include <prerror.h>
void PR_SetError(PRErrorCode errorCode
, PRInt32 oserr)
errorCode |
The NSPR (platform-independent) translation of the error.
|
|
The platform-specific error. If there is no appropriate OS error
number, a zero may be supplied.
|
#include <prerror.h>
void PR_SetErrorText(PRIntn textLength, const char *text)
PR_SetError
. If there is error text already present in the thread, the previous value
is first deleted. The new value is copied into storage allocated and owned by NSPR
and remains there until the next call to PR_SetError
or another call to
PR_SetErrorText
.
NSPR makes no use of this function. Clients may use it for their own purposes.
#include <prerror.h>
PRErrorCode PR_GetError(void)
PR_SetError
to set error numbers defined in
Error Codes.
#include <prerror.h>
PRInt32 PR_GetOSError(void)
#include <prerror.h>
PRInt32 PR_GetErrorTextLength(void)
#include <prerror.h>
PRInt32 PR_GetErrorText(char *text);
text |
On output, the array pointed to contains the thread's current
error text.
|
text
is unaffected.
prerror.h
:
|
Insufficient memory to perform request.
|
|
The file descriptor used as an argument in the
preceding function is invalid.
|
|
The operation would have blocked, which
conflicts with the semantics that have been
established.
|
|
One of the arguments of the preceding
function specified an invalid memory
address.
|
|
The preceding function is invalid for the type
of file descriptor used.
|
|
One of the arguments of the preceding
function specified an invalid memory
address.
|
|
Some unknown error has occurred.
|
|
The operation terminated because another
thread has interrupted it with
PR_Interrupt .
|
|
The preceding function has not been
implemented.
|
|
The preceding I/O function encountered
some sort of an error, perhaps an invalid
device.
|
|
The I/O operation has not completed in the
time specified for the preceding function.
|
|
An I/O operation has been attempted on a
file descriptor that is currently busy with
another operation.
|
|
The directory could not be opened.
|
|
One or more of the arguments to the function
is invalid.
|
|
The network address (PRNetAddr ) is not
available (probably in use).
|
|
The type of network address specified is not
supported.
|
|
An attempt to connect on an already
connected network file descriptor.
|
|
The network address specified is invalid (as
reported by the network).
|
|
Network address specified (PRNetAddr ) is in
use.
|
|
The peer has refused to allow the connection
to be established.
|
|
The network address specifies a host that is
unreachable (perhaps temporary).
|
|
The connection attempt did not complete in a
reasonable period of time.
|
|
The preceding function attempted to use
connected semantics on a network file
descriptor that was not connected.
|
|
Failure to load a dynamic library.
|
|
Failure to unload a dynamic library.
|
|
Symbol could not be found in the specified
library.
|
|
There are insufficient system resources to
process the request.
|
|
A directory lookup on a network address has
failed.
|
|
Attempt to access a thread-private data index
that is out of range of any index that has been
allocated to the process.
|
|
The process' table for holding open file
descriptors is full.
|
|
The system's table for holding open file
descriptors has been exceeded.
|
|
An attempt to use a non-network file
descriptor on a network-only operation.
|
|
Attempt to perform a TCP specific function
on a non-TCP file descriptor.
|
|
Attempt to bind an address to a TCP file
descriptor that is already bound.
|
|
Calling thread does not have privilege to
perform the operation requested.
|
|
The requested operation is not supported by
the platform.
|
|
The host operating system does not support
the protocol requested.
|
|
Access to the remote file has been severed.
|
|
The value retrieved is too large to be stored in
the buffer provided.
|
|
The (TCP) connection has been reset by the
peer.
|
|
Unused.
|
|
Performing the requested operation would
have caused a deadlock. The deadlock was
avoided.
|
|
An attempt to acquire a lock on a file has
failed because the file is already locked.
|
|
Completing the write or seek operation
would have resulted in a file larger than the
system could handle.
|
|
The device for storing the file is full.
|
|
Unused.
|
|
Unused.
|
|
Attempt to perform a normal file operation
on a directory.
|
|
Symbolic link loop.
|
|
Filename is longer than allowed by the host
operating system.
|
|
The requested file was not found.
|
|
Attempt to perform directory specific
operations on a normal file.
|
|
Attempt to write to a read-only file system.
|
|
Attempt to delete a directory that is not
empty.
|
|
Attempt to delete or rename a file object
while the file system is busy.
|
|
Request to rename a file to a file system on
another device.
|
|
The directory object in the file system is
corrupted.
|
|
Attempt to create or rename a file when the
new name is already being used.
|
|
Attempt to add new filename to directory
would exceed the limit allowed.
|
|
The device was in an invalid state to complete
the desired operation.
|
|
The device needed to perform the desired
request is locked.
|
|
There are no more entries in the directory.
|
|
Unexpectedly encountered end of file (Mac
OS only).
|
|
An unexpected seek error (Mac OS only).
|
|
The file is busy and the operation cannot be
performed (Mac OS only).
|
|
The operation is still in progress (probably a
nonblocking connect).
|
|
The (retried) operation has already been
initiated (probably a nonblocking connect).
|
|
The wait group is empty.
|
|
The attempted operation is on an object that
was in an improper state to perform the
request.
|
|
Placeholder for the end of the list.
|
Last Updated May 18, 2001