1.2.1 (revision 3238)
OTF2_ErrorCodes.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the Score-P software (http://www.score-p.org)
00003  *
00004  * Copyright (c) 2009-2012,
00005  *    RWTH Aachen University, Germany
00006  *    Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
00007  *    Technische Universitaet Dresden, Germany
00008  *    University of Oregon, Eugene, USA
00009  *    Forschungszentrum Juelich GmbH, Germany
00010  *    German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
00011  *    Technische Universitaet Muenchen, Germany
00012  *
00013  * See the COPYING file in the package base directory for details.
00014  *
00015  */
00016 
00017 #ifndef OTF2_ERROR_CODES_H
00018 #define OTF2_ERROR_CODES_H
00019 
00020 
00032 #include <errno.h>
00033 #include <stdint.h>
00034 #include <stdarg.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00043 typedef enum
00044 {
00046     OTF2_DEPRECATED    = -3,
00047 
00049     OTF2_ABORT         = -2,
00050 
00052     OTF2_WARNING       = -1,
00053 
00055     OTF2_SUCCESS       = 0,
00056 
00061     OTF2_ERROR_INVALID = 1,
00062 
00063     /* These are the internal implementation of POSIX error codes. */
00065     OTF2_ERROR_E2BIG,
00067     OTF2_ERROR_EACCES,
00069     OTF2_ERROR_EADDRNOTAVAIL,
00071     OTF2_ERROR_EAFNOSUPPORT,
00073     OTF2_ERROR_EAGAIN,
00075     OTF2_ERROR_EALREADY,
00077     OTF2_ERROR_EBADF,
00079     OTF2_ERROR_EBADMSG,
00081     OTF2_ERROR_EBUSY,
00083     OTF2_ERROR_ECANCELED,
00085     OTF2_ERROR_ECHILD,
00087     OTF2_ERROR_ECONNREFUSED,
00089     OTF2_ERROR_ECONNRESET,
00091     OTF2_ERROR_EDEADLK,
00093     OTF2_ERROR_EDESTADDRREQ,
00095     OTF2_ERROR_EDOM,
00097     OTF2_ERROR_EDQUOT,
00099     OTF2_ERROR_EEXIST,
00101     OTF2_ERROR_EFAULT,
00103     OTF2_ERROR_EFBIG,
00105     OTF2_ERROR_EINPROGRESS,
00107     OTF2_ERROR_EINTR,
00109     OTF2_ERROR_EINVAL,
00111     OTF2_ERROR_EIO,
00113     OTF2_ERROR_EISCONN,
00115     OTF2_ERROR_EISDIR,
00117     OTF2_ERROR_ELOOP,
00119     OTF2_ERROR_EMFILE,
00121     OTF2_ERROR_EMLINK,
00123     OTF2_ERROR_EMSGSIZE,
00125     OTF2_ERROR_EMULTIHOP,
00127     OTF2_ERROR_ENAMETOOLONG,
00129     OTF2_ERROR_ENETDOWN,
00131     OTF2_ERROR_ENETRESET,
00133     OTF2_ERROR_ENETUNREACH,
00135     OTF2_ERROR_ENFILE,
00137     OTF2_ERROR_ENOBUFS,
00139     OTF2_ERROR_ENODATA,
00141     OTF2_ERROR_ENODEV,
00143     OTF2_ERROR_ENOENT,
00145     OTF2_ERROR_ENOEXEC,
00147     OTF2_ERROR_ENOLCK,
00149     OTF2_ERROR_ENOLINK,
00151     OTF2_ERROR_ENOMEM,
00153     OTF2_ERROR_ENOMSG,
00155     OTF2_ERROR_ENOPROTOOPT,
00157     OTF2_ERROR_ENOSPC,
00159     OTF2_ERROR_ENOSR,
00161     OTF2_ERROR_ENOSTR,
00163     OTF2_ERROR_ENOSYS,
00165     OTF2_ERROR_ENOTCONN,
00167     OTF2_ERROR_ENOTDIR,
00169     OTF2_ERROR_ENOTEMPTY,
00171     OTF2_ERROR_ENOTSOCK,
00173     OTF2_ERROR_ENOTSUP,
00175     OTF2_ERROR_ENOTTY,
00177     OTF2_ERROR_ENXIO,
00179     OTF2_ERROR_EOPNOTSUPP,
00181     OTF2_ERROR_EOVERFLOW,
00183     OTF2_ERROR_EPERM,
00185     OTF2_ERROR_EPIPE,
00187     OTF2_ERROR_EPROTO,
00189     OTF2_ERROR_EPROTONOSUPPORT,
00191     OTF2_ERROR_EPROTOTYPE,
00193     OTF2_ERROR_ERANGE,
00195     OTF2_ERROR_EROFS,
00197     OTF2_ERROR_ESPIPE,
00199     OTF2_ERROR_ESRCH,
00201     OTF2_ERROR_ESTALE,
00203     OTF2_ERROR_ETIME,
00205     OTF2_ERROR_ETIMEDOUT,
00207     OTF2_ERROR_ETXTBSY,
00209     OTF2_ERROR_EWOULDBLOCK,
00211     OTF2_ERROR_EXDEV,
00212 
00213     /* These are the error codes specific to the OTF2 package */
00214 
00216     OTF2_ERROR_END_OF_FUNCTION,
00218     OTF2_ERROR_INVALID_CALL,
00220     OTF2_ERROR_INVALID_ARGUMENT,
00222     OTF2_ERROR_INVALID_RECORD,
00224     OTF2_ERROR_INVALID_DATA,
00226     OTF2_ERROR_INVALID_SIZE_GIVEN,
00228     OTF2_ERROR_UNKNOWN_TYPE,
00230     OTF2_ERROR_INTEGRITY_FAULT,
00232     OTF2_ERROR_MEM_FAULT,
00234     OTF2_ERROR_MEM_ALLOC_FAILED,
00236     OTF2_ERROR_PROCESSED_WITH_FAULTS,
00238     OTF2_ERROR_INDEX_OUT_OF_BOUNDS,
00240     OTF2_ERROR_INVALID_LINENO,
00242     OTF2_ERROR_END_OF_BUFFER,
00244     OTF2_ERROR_FILE_INTERACTION,
00246     OTF2_ERROR_FILE_CAN_NOT_OPEN,
00248     OTF2_ERROR_INTERRUPTED_BY_CALLBACK,
00250     OTF2_ERROR_PROPERTY_NAME_INVALID,
00252     OTF2_ERROR_PROPERTY_EXISTS,
00254     OTF2_ERROR_PROPERTY_NOT_FOUND,
00256     OTF2_ERROR_PROPERTY_VALUE_INVALID,
00258     OTF2_ERROR_FILE_COMPRESSION_NOT_SUPPORTED,
00260     OTF2_ERROR_DUPLICATE_MAPPING_TABLE,
00262     OTF2_ERROR_INVALID_FILE_MODE_TRANSITION
00263 } OTF2_ErrorCode;
00264 
00265 
00275 const char*
00276 OTF2_Error_GetName( OTF2_ErrorCode errorCode );
00277 
00278 
00287 const char*
00288 OTF2_Error_GetDescription( OTF2_ErrorCode errorCode );
00289 
00290 
00305 typedef OTF2_ErrorCode
00306 ( *OTF2_ErrorCallback )( void*          userData,
00307                          const char*    file,
00308                          uint64_t       line,
00309                          const char*    function,
00310                          OTF2_ErrorCode errorCode,
00311                          const char*    msgFormatString,
00312                          va_list        va );
00313 
00314 
00326 OTF2_ErrorCallback
00327 OTF2_Error_RegisterCallback( OTF2_ErrorCallback errorCallbackIn,
00328                              void*              userData );
00329 
00330 
00331 #ifdef __cplusplus
00332 } /* extern "C" */
00333 #endif
00334 
00335 #endif /* OTF2_ERROR_CODES_H */