3.0-rc2 (revision 337012f1)
Typedefs | Enumerations | Functions
OTF2_ErrorCodes.h File Reference

Error codes and error handling. More...

#include <errno.h>
#include <stdint.h>
#include <stdarg.h>

Go to the source code of this file.

Typedefs

typedef OTF2_ErrorCode(* OTF2_ErrorCallback) (void *userData, const char *file, uint64_t line, const char *function, OTF2_ErrorCode errorCode, const char *msgFormatString, va_list va)
 

Enumerations

enum  OTF2_ErrorCode {
  OTF2_DEPRECATED = -3,
  OTF2_ABORT = -2,
  OTF2_WARNING = -1,
  OTF2_SUCCESS = 0,
  OTF2_ERROR_INVALID = 1,
  OTF2_ERROR_E2BIG,
  OTF2_ERROR_EACCES,
  OTF2_ERROR_EADDRNOTAVAIL,
  OTF2_ERROR_EAFNOSUPPORT,
  OTF2_ERROR_EAGAIN,
  OTF2_ERROR_EALREADY,
  OTF2_ERROR_EBADF,
  OTF2_ERROR_EBADMSG,
  OTF2_ERROR_EBUSY,
  OTF2_ERROR_ECANCELED,
  OTF2_ERROR_ECHILD,
  OTF2_ERROR_ECONNREFUSED,
  OTF2_ERROR_ECONNRESET,
  OTF2_ERROR_EDEADLK,
  OTF2_ERROR_EDESTADDRREQ,
  OTF2_ERROR_EDOM,
  OTF2_ERROR_EDQUOT,
  OTF2_ERROR_EEXIST,
  OTF2_ERROR_EFAULT,
  OTF2_ERROR_EFBIG,
  OTF2_ERROR_EINPROGRESS,
  OTF2_ERROR_EINTR,
  OTF2_ERROR_EINVAL,
  OTF2_ERROR_EIO,
  OTF2_ERROR_EISCONN,
  OTF2_ERROR_EISDIR,
  OTF2_ERROR_ELOOP,
  OTF2_ERROR_EMFILE,
  OTF2_ERROR_EMLINK,
  OTF2_ERROR_EMSGSIZE,
  OTF2_ERROR_EMULTIHOP,
  OTF2_ERROR_ENAMETOOLONG,
  OTF2_ERROR_ENETDOWN,
  OTF2_ERROR_ENETRESET,
  OTF2_ERROR_ENETUNREACH,
  OTF2_ERROR_ENFILE,
  OTF2_ERROR_ENOBUFS,
  OTF2_ERROR_ENODATA,
  OTF2_ERROR_ENODEV,
  OTF2_ERROR_ENOENT,
  OTF2_ERROR_ENOEXEC,
  OTF2_ERROR_ENOLCK,
  OTF2_ERROR_ENOLINK,
  OTF2_ERROR_ENOMEM,
  OTF2_ERROR_ENOMSG,
  OTF2_ERROR_ENOPROTOOPT,
  OTF2_ERROR_ENOSPC,
  OTF2_ERROR_ENOSR,
  OTF2_ERROR_ENOSTR,
  OTF2_ERROR_ENOSYS,
  OTF2_ERROR_ENOTCONN,
  OTF2_ERROR_ENOTDIR,
  OTF2_ERROR_ENOTEMPTY,
  OTF2_ERROR_ENOTSOCK,
  OTF2_ERROR_ENOTSUP,
  OTF2_ERROR_ENOTTY,
  OTF2_ERROR_ENXIO,
  OTF2_ERROR_EOPNOTSUPP,
  OTF2_ERROR_EOVERFLOW,
  OTF2_ERROR_EPERM,
  OTF2_ERROR_EPIPE,
  OTF2_ERROR_EPROTO,
  OTF2_ERROR_EPROTONOSUPPORT,
  OTF2_ERROR_EPROTOTYPE,
  OTF2_ERROR_ERANGE,
  OTF2_ERROR_EROFS,
  OTF2_ERROR_ESPIPE,
  OTF2_ERROR_ESRCH,
  OTF2_ERROR_ESTALE,
  OTF2_ERROR_ETIME,
  OTF2_ERROR_ETIMEDOUT,
  OTF2_ERROR_ETXTBSY,
  OTF2_ERROR_EWOULDBLOCK,
  OTF2_ERROR_EXDEV,
  OTF2_ERROR_END_OF_FUNCTION,
  OTF2_ERROR_INVALID_CALL,
  OTF2_ERROR_INVALID_ARGUMENT,
  OTF2_ERROR_INVALID_RECORD,
  OTF2_ERROR_INVALID_DATA,
  OTF2_ERROR_INVALID_SIZE_GIVEN,
  OTF2_ERROR_UNKNOWN_TYPE,
  OTF2_ERROR_INTEGRITY_FAULT,
  OTF2_ERROR_MEM_FAULT,
  OTF2_ERROR_MEM_ALLOC_FAILED,
  OTF2_ERROR_PROCESSED_WITH_FAULTS,
  OTF2_ERROR_INDEX_OUT_OF_BOUNDS,
  OTF2_ERROR_INVALID_LINENO,
  OTF2_ERROR_END_OF_BUFFER,
  OTF2_ERROR_FILE_INTERACTION,
  OTF2_ERROR_FILE_CAN_NOT_OPEN,
  OTF2_ERROR_INTERRUPTED_BY_CALLBACK,
  OTF2_ERROR_PROPERTY_NAME_INVALID,
  OTF2_ERROR_PROPERTY_EXISTS,
  OTF2_ERROR_PROPERTY_NOT_FOUND,
  OTF2_ERROR_PROPERTY_VALUE_INVALID,
  OTF2_ERROR_FILE_COMPRESSION_NOT_SUPPORTED,
  OTF2_ERROR_DUPLICATE_MAPPING_TABLE,
  OTF2_ERROR_INVALID_FILE_MODE_TRANSITION,
  OTF2_ERROR_COLLECTIVE_CALLBACK,
  OTF2_ERROR_FILE_SUBSTRATE_NOT_SUPPORTED,
  OTF2_ERROR_INVALID_ATTRIBUTE_TYPE,
  OTF2_ERROR_LOCKING_CALLBACK,
  OTF2_ERROR_HINT_INVALID,
  OTF2_ERROR_HINT_LOCKED,
  OTF2_ERROR_HINT_INVALID_VALUE
}
 

Functions

const char * OTF2_Error_GetName (OTF2_ErrorCode errorCode)
 
const char * OTF2_Error_GetDescription (OTF2_ErrorCode errorCode)
 
OTF2_ErrorCallback OTF2_Error_RegisterCallback (OTF2_ErrorCallback errorCallbackIn, void *userData)
 

Detailed Description

Error codes and error handling.

Typedef Documentation

typedef OTF2_ErrorCode( * OTF2_ErrorCallback) (void *userData, const char *file, uint64_t line, const char *function, OTF2_ErrorCode errorCode, const char *msgFormatString, va_list va)

Signature of error handler callback functions. The error handler can be set with OTF2_Error_RegisterCallback.

Parameters
userData: Data passed to this function as given by the registration call.
file: Name of the source-code file where the error appeared
line: Line number in the source code where the error appeared
function: Name of the function where the error appeared
errorCode: Error code
msgFormatString: Format string like it is used for the printf family.
va: Variable argument list
Returns
Should return the errorCode

Enumeration Type Documentation

This is the list of error codes for OTF2.

Enumerator
OTF2_DEPRECATED 

Special marker for error messages which indicates a deprecation.

OTF2_ABORT 

Special marker when the application will be aborted.

OTF2_WARNING 

Special marker for error messages which are only warnings.

OTF2_SUCCESS 

Operation successful

OTF2_ERROR_INVALID 

Invalid error code

Should only be used internally and not as an actual error code.

OTF2_ERROR_E2BIG 

The list of arguments is too long

OTF2_ERROR_EACCES 

Not enough rights

OTF2_ERROR_EADDRNOTAVAIL 

Address is not available

OTF2_ERROR_EAFNOSUPPORT 

Address family is not supported

OTF2_ERROR_EAGAIN 

Resource temporarily not available

OTF2_ERROR_EALREADY 

Connection is already processed

OTF2_ERROR_EBADF 

Invalid file pointer

OTF2_ERROR_EBADMSG 

Invalid message

OTF2_ERROR_EBUSY 

Resource or device is busy

OTF2_ERROR_ECANCELED 

Operation was aborted

OTF2_ERROR_ECHILD 

No child process available

OTF2_ERROR_ECONNREFUSED 

Connection was refused

OTF2_ERROR_ECONNRESET 

Connection was reset

OTF2_ERROR_EDEADLK 

Resolved deadlock

OTF2_ERROR_EDESTADDRREQ 

Destination address was expected

OTF2_ERROR_EDOM 

Domain error

OTF2_ERROR_EDQUOT 

Reserved

OTF2_ERROR_EEXIST 

File does already exist

OTF2_ERROR_EFAULT 

Invalid address

OTF2_ERROR_EFBIG 

File is too large

OTF2_ERROR_EINPROGRESS 

Operation is work in progress

OTF2_ERROR_EINTR 

Interruption of an operating system call

OTF2_ERROR_EINVAL 

Invalid argument

OTF2_ERROR_EIO 

Generic I/O error

OTF2_ERROR_EISCONN 

Socket is already connected

OTF2_ERROR_EISDIR 

Target is a directory

OTF2_ERROR_ELOOP 

Too many layers of symbolic links

OTF2_ERROR_EMFILE 

Too many opened files

OTF2_ERROR_EMLINK 

Too many links

OTF2_ERROR_EMSGSIZE 

Message buffer is too small

OTF2_ERROR_EMULTIHOP 

Reserved

OTF2_ERROR_ENAMETOOLONG 

Filename is too long

OTF2_ERROR_ENETDOWN 

Network is down

OTF2_ERROR_ENETRESET 

Connection was reset from the network

OTF2_ERROR_ENETUNREACH 

Network is not reachable

OTF2_ERROR_ENFILE 

Too many opened files

OTF2_ERROR_ENOBUFS 

No buffer space available

OTF2_ERROR_ENODATA 

No more data left in the queue

OTF2_ERROR_ENODEV 

This device does not support this function

OTF2_ERROR_ENOENT 

File or directory does not exist

OTF2_ERROR_ENOEXEC 

Cannot execute binary

OTF2_ERROR_ENOLCK 

Locking failed

OTF2_ERROR_ENOLINK 

Reserved

OTF2_ERROR_ENOMEM 

Not enough main memory available

OTF2_ERROR_ENOMSG 

Message has not the expected type

OTF2_ERROR_ENOPROTOOPT 

This protocol is not available

OTF2_ERROR_ENOSPC 

No space left on device

OTF2_ERROR_ENOSR 

No stream available

OTF2_ERROR_ENOSTR 

This is not a stream

OTF2_ERROR_ENOSYS 

Requested function is not implemented

OTF2_ERROR_ENOTCONN 

Socket is not connected

OTF2_ERROR_ENOTDIR 

This is not a directory

OTF2_ERROR_ENOTEMPTY 

This directory is not empty

OTF2_ERROR_ENOTSOCK 

No socket

OTF2_ERROR_ENOTSUP 

This operation is not supported

OTF2_ERROR_ENOTTY 

This IOCTL is not supported by the device

OTF2_ERROR_ENXIO 

Device is not yet configured

OTF2_ERROR_EOPNOTSUPP 

Operation is not supported by this socket

OTF2_ERROR_EOVERFLOW 

Value is to long for the datatype

OTF2_ERROR_EPERM 

Operation is not permitted

OTF2_ERROR_EPIPE 

Broken pipe

OTF2_ERROR_EPROTO 

Protocol error

OTF2_ERROR_EPROTONOSUPPORT 

Protocol is not supported

OTF2_ERROR_EPROTOTYPE 

Wrong protocol type for this socket

OTF2_ERROR_ERANGE 

Value is out of range

OTF2_ERROR_EROFS 

Filesystem is read only

OTF2_ERROR_ESPIPE 

This seek is not allowed

OTF2_ERROR_ESRCH 

No matching process found

OTF2_ERROR_ESTALE 

Reserved

OTF2_ERROR_ETIME 

Timeout in file stream or IOCTL

OTF2_ERROR_ETIMEDOUT 

Connection timed out

OTF2_ERROR_ETXTBSY 

File could not be executed while it is opened

OTF2_ERROR_EWOULDBLOCK 

Operation would be blocking

OTF2_ERROR_EXDEV 

Invalid link between devices

OTF2_ERROR_END_OF_FUNCTION 

Unintentional reached end of function

OTF2_ERROR_INVALID_CALL 

Function call not allowed in current state

OTF2_ERROR_INVALID_ARGUMENT 

Parameter value out of range

OTF2_ERROR_INVALID_RECORD 

Invalid definition or event record

OTF2_ERROR_INVALID_DATA 

Invalid or inconsistent record data

OTF2_ERROR_INVALID_SIZE_GIVEN 

The given size cannot be used

OTF2_ERROR_UNKNOWN_TYPE 

The given type is not known

OTF2_ERROR_INTEGRITY_FAULT 

The structural integrity is not given

OTF2_ERROR_MEM_FAULT 

This could not be done with the given memory

OTF2_ERROR_MEM_ALLOC_FAILED 

Memory allocation failed

OTF2_ERROR_PROCESSED_WITH_FAULTS 

An error appeared when data was processed

OTF2_ERROR_INDEX_OUT_OF_BOUNDS 

Index out of bounds

OTF2_ERROR_INVALID_LINENO 

Invalid source code line number

OTF2_ERROR_END_OF_BUFFER 

End of buffer/file reached

OTF2_ERROR_FILE_INTERACTION 

Invalid file operation

OTF2_ERROR_FILE_CAN_NOT_OPEN 

Unable to open file

OTF2_ERROR_INTERRUPTED_BY_CALLBACK 

Record reading interrupted by reader callback

OTF2_ERROR_PROPERTY_NAME_INVALID 

Property name does not conform to the naming scheme

OTF2_ERROR_PROPERTY_EXISTS 

Property already exists

OTF2_ERROR_PROPERTY_NOT_FOUND 

Property not found found in this archive

OTF2_ERROR_PROPERTY_VALUE_INVALID 

Property value does not have the expected value

OTF2_ERROR_FILE_COMPRESSION_NOT_SUPPORTED 

Missing library support for requested compression mode

OTF2_ERROR_DUPLICATE_MAPPING_TABLE 

Multiple definitions for the same mapping type

OTF2_ERROR_INVALID_FILE_MODE_TRANSITION 

File mode transition not permitted

OTF2_ERROR_COLLECTIVE_CALLBACK 

Collective callback failed

OTF2_ERROR_FILE_SUBSTRATE_NOT_SUPPORTED 

Missing library support for requested file substrate

OTF2_ERROR_INVALID_ATTRIBUTE_TYPE 

The type of the attribute does not match the expected one.

OTF2_ERROR_LOCKING_CALLBACK 

Locking callback failed

OTF2_ERROR_HINT_INVALID 

The hint is not valid for the current operation mode of OTF2.

OTF2_ERROR_HINT_LOCKED 

The hint was either already set by the user or at least once queried from OTF2.

OTF2_ERROR_HINT_INVALID_VALUE 

Invalid value for hint.

Function Documentation

const char* OTF2_Error_GetName ( OTF2_ErrorCode  errorCode)

Returns the name of an error code.

Parameters
errorCode: Error Code
Returns
Returns the name of a known error code, and "INVALID_ERROR" for invalid or unknown error IDs.
const char* OTF2_Error_GetDescription ( OTF2_ErrorCode  errorCode)

Returns the description of an error code.

Parameters
errorCode: Error Code
Returns
Returns the description of a known error code.
OTF2_ErrorCallback OTF2_Error_RegisterCallback ( OTF2_ErrorCallback  errorCallbackIn,
void *  userData 
)

Register a programmers callback function for error handling.

Parameters
errorCallbackIn: Function which will be called instead of printing a default message to standard error.
userData: Data pointer passed to the callback.
Returns
Function pointer to the former error handling function.