This chapter describes the functions for retrieving and setting errors and the error codes set by NSPR.
For information on naming conventions for NSPR types, functions, and macros, see NSPR Naming Conventions.
Error Type
Error Functions
Error Codes
Error codes defined in prerror.h:
PR_OUT_OF_MEMORY_ERRORInsufficient memory to perform request.
PR_BAD_DESCRIPTOR_ERRORThe file descriptor used as an argument in the preceding function is invalid.
PR_WOULD_BLOCK_ERRORThe operation would have blocked, which conflicts with the semantics that have been established.
PR_ACCESS_FAULT_ERROROne of the arguments of the preceding function specified an invalid memory address.
PR_INVALID_METHOD_ERRORThe preceding function is invalid for the type of file descriptor used.
PR_ILLEGAL_ACCESS_ERROROne of the arguments of the preceding function specified an invalid memory address.
PR_UNKNOWN_ERRORSome unknown error has occurred.
PR_PENDING_INTERRUPT_ERRORThe operation terminated because another thread has interrupted it with PR_Interrupt.
PR_NOT_IMPLEMENTED_ERRORThe preceding function has not been implemented.
PR_IO_ERRORThe preceding I/O function encountered some sort of an error, perhaps an invalid device.
PR_IO_TIMEOUT_ERRORThe I/O operation has not completed in the time specified for the preceding function.
PR_IO_PENDING_ERRORAn I/O operation has been attempted on a file descriptor that is currently busy with another operation.
PR_DIRECTORY_OPEN_ERRORThe directory could not be opened.
PR_INVALID_ARGUMENT_ERROROne or more of the arguments to the function is invalid.
PR_ADDRESS_NOT_AVAILABLE_ERRORThe network address (PRNetAddr) is not available (probably in use).
PR_ADDRESS_NOT_SUPPORTED_ERRORThe type of network address specified is not supported.
PR_IS_CONNECTED_ERRORAn attempt to connect on an already connected network file descriptor.
PR_BAD_ADDRESS_ERRORThe network address specified is invalid (as reported by the network).
PR_ADDRESS_IN_USE_ERRORNetwork address specified (PRNetAddr) is in use.
PR_CONNECT_REFUSED_ERRORThe peer has refused to allow the connection to be established.
PR_NETWORK_UNREACHABLE_ERRORThe network address specifies a host that is unreachable (perhaps temporary).
PR_CONNECT_TIMEOUT_ERRORThe connection attempt did not complete in a reasonable period of time.
PR_NOT_CONNECTED_ERRORThe preceding function attempted to use connected semantics on a network file descriptor that was not connected.
PR_LOAD_LIBRARY_ERRORFailure to load a dynamic library.
PR_UNLOAD_LIBRARY_ERRORFailure to unload a dynamic library.
PR_FIND_SYMBOL_ERRORSymbol could not be found in the specified library.
PR_INSUFFICIENT_RESOURCES_ERRORThere are insufficient system resources to process the request.
PR_DIRECTORY_LOOKUP_ERRORA directory lookup on a network address has failed.
PR_TPD_RANGE_ERRORAttempt to access a thread-private data index that is out of range of any index that has been allocated to the process.
PR_PROC_DESC_TABLE_FULL_ERRORThe process’ table for holding open file descriptors is full.
PR_SYS_DESC_TABLE_FULL_ERRORThe system’s table for holding open file descriptors has been exceeded.
PR_NOT_SOCKET_ERRORAn attempt to use a non-network file descriptor on a network-only operation.
PR_NOT_TCP_SOCKET_ERRORAttempt to perform a TCP specific function on a non-TCP file descriptor.
PR_SOCKET_ADDRESS_IS_BOUND_ERROAttempt to bind an address to a TCP file descriptor that is already bound.
PR_NO_ACCESS_RIGHTS_ERRORCalling thread does not have privilege to perform the operation requested.
PR_OPERATION_NOT_SUPPORTED_ERROThe requested operation is not supported by the platform.
PR_PROTOCOL_NOT_SUPPORTED_ERRORThe host operating system does not support the protocol requested.
PR_REMOTE_FILE_ERRORAccess to the remote file has been severed.
PR_BUFFER_OVERFLOW_ERRORThe value retrieved is too large to be stored in the buffer provided.
PR_CONNECT_RESET_ERRORThe (TCP) connection has been reset by the peer.
PR_RANGE_ERRORUnused.
PR_DEADLOCK_ERRORPerforming the requested operation would have caused a deadlock. The deadlock was avoided.
PR_FILE_IS_LOCKED_ERRORAn attempt to acquire a lock on a file has failed because the file is already locked.
PR_FILE_TOO_BIG_ERRORCompleting the write or seek operation would have resulted in a file larger than the system could handle.
PR_NO_DEVICE_SPACE_ERRORThe device for storing the file is full.
PR_PIPE_ERRORUnused.
PR_NO_SEEK_DEVICE_ERRORUnused.
PR_IS_DIRECTORY_ERRORAttempt to perform a normal file operation on a directory.
PR_LOOP_ERRORSymbolic link loop.
PR_NAME_TOO_LONG_ERRORFilename is longer than allowed by the host operating system.
PR_FILE_NOT_FOUND_ERRORThe requested file was not found.
PR_NOT_DIRECTORY_ERRORAttempt to perform directory specific operations on a normal file.
PR_READ_ONLY_FILESYSTEM_ERRORAttempt to write to a read-only file system.
PR_DIRECTORY_NOT_EMPTY_ERRORAttempt to delete a directory that is not empty.
PR_FILESYSTEM_MOUNTED_ERRORAttempt to delete or rename a file object while the file system is busy.
PR_NOT_SAME_DEVICE_ERRORRequest to rename a file to a file system on another device.
PR_DIRECTORY_CORRUPTED_ERRORThe directory object in the file system is corrupted.
PR_FILE_EXISTS_ERRORAttempt to create or rename a file when the new name is already being used.
PR_MAX_DIRECTORY_ENTRIES_ERRORAttempt to add new filename to directory would exceed the limit allowed.
PR_INVALID_DEVICE_STATE_ERRORThe device was in an invalid state to complete the desired operation.
PR_DEVICE_IS_LOCKED_ERRORThe device needed to perform the desired request is locked.
PR_NO_MORE_FILES_ERRORThere are no more entries in the directory.
PR_END_OF_FILE_ERRORUnexpectedly encountered end of file (Mac OS only).
PR_FILE_SEEK_ERRORAn unexpected seek error (Mac OS only).
PR_FILE_IS_BUSY_ERRORThe file is busy and the operation cannot be performed.
PR_IN_PROGRESS_ERRORThe operation is still in progress (probably a nonblocking connect).
PR_ALREADY_INITIATED_ERRORThe (retried) operation has already been initiated (probably a nonblocking connect).
PR_GROUP_EMPTY_ERRORThe wait group is empty.
PR_INVALID_STATE_ERRORThe attempted operation is on an object that was in an improper state to perform the request.
PR_MAX_ERRORPlaceholder for the end of the list.