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.


Synopsis

signature POSIX_ERROR
structure Error : POSIX_ERROR

Interface

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

Description

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).

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

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

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

badf
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).

badmsg
indicates that the implementation has detected a corrupted message.

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

canceled
indicates that the associated asynchronous operation was cancelled before completion.

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

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

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

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

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

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

inprogress
indicates that an asynchronous process has not yet completed.

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

inval
indicates that an invalid argument was supplied.

io
indicates that some physical input or output error occurred.

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

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

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

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

msgsize
indicates an inappropriate message buffer length.

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

nfile
indicates that there were too many open files.

nodev
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.

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

noexec
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.

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

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

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

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

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

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

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

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

nxio
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.

perm
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.

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

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

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

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

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

xdev
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
Comments to John Reppy.
Copyright © 1997 Bell Labs, Lucent Technologies