The Standard ML Basis Library

The Posix.Error structure

The structure Posix.Error provides symbolic names for errors that may be generated by the POSIX library.


signature POSIX_ERROR
structure Error : POSIX_ERROR


eqtype syserror
val toWord : syserror -> SysWord.word
val fromWord : SysWord.word -> syserror
val errorMsg : syserror -> string
val errorName : syserror -> string
val syserror : string -> syserror option
val toobig : syserror
val acces : syserror
val again : syserror
val badf : syserror
val badmsg : syserror
val busy : syserror
val canceled : syserror
val child : syserror
val deadlk : syserror
val dom : syserror
val exist : syserror
val fault : syserror
val fbig : syserror
val inprogress : syserror
val intr : syserror
val inval : syserror
val io : syserror
val isdir : syserror
val loop : syserror
val mfile : syserror
val mlink : syserror
val msgsize : syserror
val nametoolong : syserror
val nfile : syserror
val nodev : syserror
val noent : syserror
val noexec : syserror
val nolck : syserror
val nomem : syserror
val nospc : syserror
val nosys : syserror
val notdir : syserror
val notempty : syserror
val notsup : syserror
val notty : syserror
val nxio : syserror
val perm : syserror
val pipe : syserror
val range : syserror
val rofs : syserror
val spipe : syserror
val srch : syserror
val xdev : syserror


eqtype syserror
This is identical to the type OS.syserror.

toWord sy
returns a non-zero word representation for the system error sy.

fromWord w
the inverse of toWord. Note that there is no validation that a syserror value generated this way corresponds to an error value supported by the underlying system.

errorMsg sy
returns a string that describes the system error sy.

errorName err
syserror s
The former returns a unique name used for the syserror value. The latter returns the syserror whose name is s if it exists. If e is a syserror, we have SOME e = syserror(errorName e).

indicates that the sum of bytes used by the argument list and environment list was greater than the system imposed limit.

indicates that an attempt was made to access a file in a way that is forbidden by its file access permissions.

indicates that a resource is temporarily unavailable, and later calls to the same routine may complete normally.

indicates a bad file descriptor that was out of range, referred to no open file, or a read (write) request was made to a file that was only open for writing (reading).

indicates that the implementation has detected a corrupted message.

indicates that an attempt was made to use a system resource that was being used in a conflicting manner by another process.

indicates that the associated asynchronous operation was cancelled before completion.

indicates that wait related function was executed by a process that had no existing or unwaited-for child process.

indicates that an attempt was made to lock a system resource that would have resulted in a deadlock situation.

indicates that an input argument was outside the defined domain of a mathematical function.

indicates that an existing file was specified in an inappropriate context; for instance, as the new link in a link function.

indicates that the system detected an invalid address in attempting to use an argument of a call.

indicates that the size of a file would exceed an implementation-defined maximum file size.

indicates that an asynchronous process has not yet completed.

indicates that an asynchronous signal (such as quit or terminate signal) was caught by the process during the execution of an interruptible function.

indicates that an invalid argument was supplied.

indicates that some physical input or output error occurred.

indicates an illegal operation on a directory, such as opening a directory for writing.

indicates a loop was encountered during pathname resolution due to symbolic links.

indicates that an attempt was made to open more than the maximum number of file descriptors allowed in this process.

indicates that an attempt was made to have the link count of a single file exceed a system dependent limit.

indicates an inappropriate message buffer length.

indicates that the size of a pathname string, or a pathname component was longer than system dependent limits.

indicates that there were too many open files.

indicates that an attempt was made to apply an inappropriate function to a device; for example, trying to read a write-only device such as a printer.

indicates that a component of a specified pathname did not exist, or the pathname was an empty string.

indicates that a request was made to execute a file that, although it had the appropriate permissions, was not in the format required by the implementation for executable files.

indicates that a system-imposed limit on the number of simultaneous file and record locks was reached.

indicates that the process image required more memory than was allowed by the hardware or by system-imposed memory management constraints.

indicates that during a write operation on a regular file, or when extending a directory, there was no free space left on the device.

indicates that an attempt was made to use a function that is not available in this implementation.

indicates that a component of the specified pathname existed, but it was not a directory, when a directory was expected.

indicates that a directory with entries other than dot and dot-dot was supplied when an empty directory was expected.

indicates that the implementation does not support this feature of the standard.

indicates that a control function was attempted for a file or a special file for which the operation was inappropriate.

indicates that input or output on a special file referred to a device that did not exist, or made a request beyond the limits of the device. This error may occur when, for example, a tape drive is not online.

indicates that an attempt was made to perform an operation limited to processes with appropriate privileges or to the owner of a file or other resource.

indicates that a write was attempted on a pipe or FIFO for which there was no process to read the data.

indicates that the result of a function was too large to fit in the available space.

indicates that an attempt was made to modify a file or directory on a file system that was read-only at that time.

indicates that an invalid seek operation was issued on a pipe or FIFO.

indicates that no such process could be found corresponding to that specified by the given process ID.

indicates that a link to a file on another file system was attempted.

See Also

OS, Posix

[ INDEX | TOP | Parent | Root ]

Last Modified April 17, 1995
Copyright © 1996 AT&T