*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> ftn/perror (3)              
Title
Content
Arch
Section
 

Contents


PERROR(3F)							    PERROR(3F)


NAME    [Toc]    [Back]

     perror, gerror, ierrno, strerror -	get system error messages

SYNOPSIS    [Toc]    [Back]

     subroutine	perror (string)
     character*(*) string

     subroutine	gerror (string)
     character*(*) string

     character*(*) function gerror()

     function ierrno()

     subroutine	strerror (ierror_num, string)
     integer ierror_num
     character*(*) string

DESCRIPTION    [Toc]    [Back]

     Perror will write a message to fortran logical unit 0 appropriate to the
     last detected system error.  String will be written preceding the
     standard error message.

     Gerror returns the	system error message in	character variable string.
     Gerror may	be called either as a subroutine or as a function.

     Ierrno will return	the error number of the	last detected system error.
     This number is updated only when an error actually	occurs.	 Most routines
     and I/O statements	that might generate such errors	return an error	code
     after the call; that value	is a more reliable indicator of	what caused
     the error condition.

     Strerror is the same as gerror except you pass in an explicit error
     number.

FILES    [Toc]    [Back]

     /usr/lib/libI77.a

SEE ALSO    [Toc]    [Back]

      
      
     intro(2), perror(3F)
     D.	L. Wasley, Introduction	to the f77 I/O Library

BUGS    [Toc]    [Back]

     String in the call	to perror can be no longer than	127 characters.

     The length	of the string returned by gerror and strerror is determined by
     the calling program.

     Error numbers > 100 are mapped to Fortran errors.	Thus you may not be
     able to retrieve the UNIX errors >	100 using these	functions.
PERROR(3F)							    PERROR(3F)


NOTES    [Toc]    [Back]

     UNIX system error codes are described in intro(2).	 The f77 I/O error
     codes and their meanings are:

	  100  ``error in format''
	  101  ``out of	space for i/o unit table''
	  102  ``formatted i/o not allowed''
	  103  ``unformatted i/o not allowed''
	  104  ``direct	i/o not	allowed''
	  105  ``sequential i/o	not allowed''
	  106  ``can't backspace file''
	  107  ``null file name''
	  108  ``can't stat file''
	  109  ``file already connected''
	  110  ``off end of record''
	  111  ``truncation failed in end file''
	  112  ``incomprehensible list input''
	  113  ``out of	free space''
	  114  ``unit not connected''
	  115  ``read unexpected character''
	  116  ``blank logical input field''
	  117  ``bad variable type''
	  118  ``bad namelist name''
	  119  ``variable not in namelist''
	  120  ``no end	record''
	  121  ``namelist subscript out	of range''
	  122  ``negative repeat count''
	  123  ``illegal operation for unit''
	  124  ``off beginning of record''
	  125  ``no * after repeat count''
	  126  ``'new' file exists''
	  127  ``can't find 'old' file''
	  128  ``unknown system	error''
	  129  ``requires seek ability''
	  130  ``illegal argument''
	  131  ``duplicate key value on	write''
	  132  ``indexed file not open''
	  133  ``bad isam argument''
	  134  ``bad key description''
	  135  ``too many open indexed files''
	  136  ``corrupted isam	file''
	  137  ``isam file not opened for exclusive access''
	  138  ``record	locked''
	  139  ``key already exists''
	  140  ``cannot	delete primary key''
	  141  ``beginning or end of file reached''
	  142  ``cannot	find requested record''
	  143  ``current record	not defined''
	  144  ``isam file is exclusively locked''
	  145  ``filename too long''
	  146  ``cannot	create lock file''
	  147  ``record	too long''



									Page 2






PERROR(3F)							    PERROR(3F)



	  148  ``key structure does not	match file structure''
	  149  ``direct	access on an indexed file not allowed''
	  150  ``keyed access on a sequential file not allowed''
	  151  ``keyed access on a relative file not allowed''
	  152  ``append	access on an indexed file not allowed''
	  153  ``must specify record length''
	  154  ``key field value type does not match key type''
	  155  ``character key field value length too long''
	  156  ``fixed record on sequential file not allowed''
	  157  ``variable records allowed only on unformatted sequential
	  file''
	  158  ``stream	records	allowed	only on	formatted sequential file''
	  159  ``maximum number	of records in direct access file exceeded''
	  160  ``attempt to create or write to a readonly file''
	  161  ``must specify key descriptions''
	  162  ``carriage control not allowed for unformatted units''
	  163  ``indexed files only''
	  164  ``cannot	use on indexed file''
	  165  ``cannot	use on indexed or append file''
	  166  ``error in closing file''
	  167  ``invalid code in format	specification''
	  168  ``invalid record	number in direct access	file''
	  169  ``cannot	have endfile record on non-sequential file''
	  170  ``cannot	position within	current	file''
	  171  ``cannot	have sequential	records	on direct access file''
	  172  ``cannot	find namelist in input file''
	  173  ``cannot	read from stdout''
	  174  ``cannot	write to stdin''
	  175  ``stat call failed in f77inode''
	  181  ``Direct	unformatted I/O	not allowed.''
	  182  ``cannot	open a directory''
	  183  ``subscript out of bounds''
	  184  ``function not declared as varargs''
	  185  ``internal error'' -- may be due	to illegal vararg usage.

ORIGIN    [Toc]    [Back]

     MIPS Computer Systems


















									Page 3






perror(3C)							    perror(3C)


NAME    [Toc]    [Back]

     perror, errno - print system error	messages

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>

     void perror (const	char *s);

     #include <errno.h>

     extern int	errno;

DESCRIPTION    [Toc]    [Back]

     perror produces a message on the standard error output (file descriptor
     2), describing the	last error encountered during a	call to	a system or
     library function.	The argument string s is printed first,	then a colon
     and a blank, then the message and a newline.  (However, if	s is a null
     pointer or	points to a null string, the colon is not printed.)  To	be of
     most use, the argument string should include the name of the program that
     incurred the error.  The error number is taken from the external variable
     errno, which is set when errors occur but not cleared when	non-erroneous
     calls are made.

SEE ALSO    [Toc]    [Back]

      
      
     intro(2), fmtmsg(3C), strerror(3C), oserror(3C).

NOTE    [Toc]    [Back]

     Code using	sys_errlist, and _sys_errlist directly will not	be able	to
     display any errno greater than 152.


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
sys_errlist FreeBSD system error messages
strerror FreeBSD system error messages
sys_nerr FreeBSD system error messages
strerror_r FreeBSD system error messages
perror FreeBSD system error messages
perror IRIX print system error messages
dmesg HP-UX collect system diagnostic messages to form error log
perror OpenBSD write error messages to standard error
perror NetBSD write error messages to standard error
writesrv Tru64 Lets users send messages to and receive messages from a remote system
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service