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

  man pages->IRIX man pages -> libelf/elf_error (3)              
Title
Content
Arch
Section
 

Contents


ELF_ERROR(3E)							 ELF_ERROR(3E)


NAME    [Toc]    [Back]

     elf_errmsg, elf_errno - error handling

SYNOPSIS    [Toc]    [Back]

     cc	[flag ...] file	...  -lelf [library ...]

     #include <libelf.h>

     const char	*elf_errmsg(int	err);
     int elf_errno(void);

DESCRIPTION    [Toc]    [Back]

     If	an ELF library function	fails, a program may call elf_errno to
     retrieve the library's internal error number.  As a side effect, this
     function resets the internal error	number to zero,	which indicates	no
     error.

     elf_errmsg	takes an error number, err, and	returns	a null-terminated
     error message (with no trailing new-line) that describes the problem.  A
     zero err retrieves	a message for the most recent error.  If no error has
     occurred, the return value	is a null pointer (not a pointer to the	null
     string).  Using err of -1 also retrieves the most recent error, except it
     guarantees	a non-null return value, even when no error has	occurred.  If
     no	message	is available for the given number, elf_errmsg returns a
     pointer to	an appropriate message.	 This function does not	have the side
     effect of clearing	the internal error number.

EXAMPLE    [Toc]    [Back]

     The following fragment clears the internal	error number and checks	it
     later for errors.	Unless an error	occurs after the first call to
     elf_errno,	the next call will return zero.

	  (void)elf_errno();
	  while	(more_to_do)
	  {
		  /* processing	... */
		  if ((err = elf_errno()) != 0)
		  {
			  msg =	elf_errmsg(err);
			  /* print msg */
		  }
	  }

SEE ALSO    [Toc]    [Back]

      
      
     elf(3E), elf_version(3E).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
matherr IRIX error-handling function
TIFFError IRIX library error handling interface
clSetErrorHandler IRIX Select an alternate error handling routine
IPC::Open3 IRIX open a process for reading, writing, and error handling
alSetErrorHandler IRIX establish an alternate audio error handling routine
cplxerr IRIX error-handling function for the C++ Complex Math Library
ALseterrorhandler IRIX (obsolete) establish an alternate audio error handling routine
dgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
cgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
sgerfs IRIX improve the computed solution to a system of linear equations and provides error bounds and backward error est
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service