1.5.1 (revision 4026)
otf2/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  *
00007  * Copyright (c) 2009-2012,
00008  * Gesellschaft fuer numerische Simulation mbH Braunschweig, Germany
00009  *
00010  * Copyright (c) 2009-2012, 2014,
00011  * Technische Universitaet Dresden, Germany
00012  *
00013  * Copyright (c) 2009-2012,
00014  * University of Oregon, Eugene, USA
00015  *
00016  * Copyright (c) 2009-2012,
00017  * Forschungszentrum Juelich GmbH, Germany
00018  *
00019  * Copyright (c) 2009-2012,
00020  * German Research School for Simulation Sciences GmbH, Juelich/Aachen, Germany
00021  *
00022  * Copyright (c) 2009-2012,
00023  * Technische Universitaet Muenchen, Germany
00024  *
00025  * This software may be modified and distributed under the terms of
00026  * a BSD-style license.  See the COPYING file in the package base
00027  * directory for details.
00028  *
00029  */
00030 
00031 #ifndef OTF2_ERROR_CODES_H
00032 #define OTF2_ERROR_CODES_H
00033 
00034 
00043 #include <errno.h>
00044 #include <stdint.h>
00045 #include <stdarg.h>
00046 
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050 
00054 typedef enum
00055 {
00057     OTF2_DEPRECATED    = -3,
00058 
00060     OTF2_ABORT         = -2,
00061 
00063     OTF2_WARNING       = -1,
00064 
00066     OTF2_SUCCESS       = 0,
00067 
00072     OTF2_ERROR_INVALID = 1,
00073 
00074     /* These are the internal implementation of POSIX error codes. */
00076     OTF2_ERROR_E2BIG,
00078     OTF2_ERROR_EACCES,
00080     OTF2_ERROR_EADDRNOTAVAIL,
00082     OTF2_ERROR_EAFNOSUPPORT,
00084     OTF2_ERROR_EAGAIN,
00086     OTF2_ERROR_EALREADY,
00088     OTF2_ERROR_EBADF,
00090     OTF2_ERROR_EBADMSG,
00092     OTF2_ERROR_EBUSY,
00094     OTF2_ERROR_ECANCELED,
00096     OTF2_ERROR_ECHILD,
00098     OTF2_ERROR_ECONNREFUSED,
00100     OTF2_ERROR_ECONNRESET,
00102     OTF2_ERROR_EDEADLK,
00104     OTF2_ERROR_EDESTADDRREQ,
00106     OTF2_ERROR_EDOM,
00108     OTF2_ERROR_EDQUOT,
00110     OTF2_ERROR_EEXIST,
00112     OTF2_ERROR_EFAULT,
00114     OTF2_ERROR_EFBIG,
00116     OTF2_ERROR_EINPROGRESS,
00118     OTF2_ERROR_EINTR,
00120     OTF2_ERROR_EINVAL,
00122     OTF2_ERROR_EIO,
00124     OTF2_ERROR_EISCONN,
00126     OTF2_ERROR_EISDIR,
00128     OTF2_ERROR_ELOOP,
00130     OTF2_ERROR_EMFILE,
00132     OTF2_ERROR_EMLINK,
00134     OTF2_ERROR_EMSGSIZE,
00136     OTF2_ERROR_EMULTIHOP,
00138     OTF2_ERROR_ENAMETOOLONG,
00140     OTF2_ERROR_ENETDOWN,
00142     OTF2_ERROR_ENETRESET,
00144     OTF2_ERROR_ENETUNREACH,
00146     OTF2_ERROR_ENFILE,
00148     OTF2_ERROR_ENOBUFS,
00150     OTF2_ERROR_ENODATA,
00152     OTF2_ERROR_ENODEV,
00154     OTF2_ERROR_ENOENT,
00156     OTF2_ERROR_ENOEXEC,
00158     OTF2_ERROR_ENOLCK,
00160     OTF2_ERROR_ENOLINK,
00162     OTF2_ERROR_ENOMEM,
00164     OTF2_ERROR_ENOMSG,
00166     OTF2_ERROR_ENOPROTOOPT,
00168     OTF2_ERROR_ENOSPC,
00170     OTF2_ERROR_ENOSR,
00172     OTF2_ERROR_ENOSTR,
00174     OTF2_ERROR_ENOSYS,
00176     OTF2_ERROR_ENOTCONN,
00178     OTF2_ERROR_ENOTDIR,
00180     OTF2_ERROR_ENOTEMPTY,
00182     OTF2_ERROR_ENOTSOCK,
00184     OTF2_ERROR_ENOTSUP,
00186     OTF2_ERROR_ENOTTY,
00188     OTF2_ERROR_ENXIO,
00190     OTF2_ERROR_EOPNOTSUPP,
00192     OTF2_ERROR_EOVERFLOW,
00194     OTF2_ERROR_EPERM,
00196     OTF2_ERROR_EPIPE,
00198     OTF2_ERROR_EPROTO,
00200     OTF2_ERROR_EPROTONOSUPPORT,
00202     OTF2_ERROR_EPROTOTYPE,
00204     OTF2_ERROR_ERANGE,
00206     OTF2_ERROR_EROFS,
00208     OTF2_ERROR_ESPIPE,
00210     OTF2_ERROR_ESRCH,
00212     OTF2_ERROR_ESTALE,
00214     OTF2_ERROR_ETIME,
00216     OTF2_ERROR_ETIMEDOUT,
00218     OTF2_ERROR_ETXTBSY,
00220     OTF2_ERROR_EWOULDBLOCK,
00222     OTF2_ERROR_EXDEV,
00223 
00224     /* These are the error codes specific to the OTF2 package */
00225 
00227     OTF2_ERROR_END_OF_FUNCTION,
00229     OTF2_ERROR_INVALID_CALL,
00231     OTF2_ERROR_INVALID_ARGUMENT,
00233     OTF2_ERROR_INVALID_RECORD,
00235     OTF2_ERROR_INVALID_DATA,
00237     OTF2_ERROR_INVALID_SIZE_GIVEN,
00239     OTF2_ERROR_UNKNOWN_TYPE,
00241     OTF2_ERROR_INTEGRITY_FAULT,
00243     OTF2_ERROR_MEM_FAULT,
00245     OTF2_ERROR_MEM_ALLOC_FAILED,
00247     OTF2_ERROR_PROCESSED_WITH_FAULTS,
00249     OTF2_ERROR_INDEX_OUT_OF_BOUNDS,
00251     OTF2_ERROR_INVALID_LINENO,
00253     OTF2_ERROR_END_OF_BUFFER,
00255     OTF2_ERROR_FILE_INTERACTION,
00257     OTF2_ERROR_FILE_CAN_NOT_OPEN,
00259     OTF2_ERROR_INTERRUPTED_BY_CALLBACK,
00261     OTF2_ERROR_PROPERTY_NAME_INVALID,
00263     OTF2_ERROR_PROPERTY_EXISTS,
00265     OTF2_ERROR_PROPERTY_NOT_FOUND,
00267     OTF2_ERROR_PROPERTY_VALUE_INVALID,
00269     OTF2_ERROR_FILE_COMPRESSION_NOT_SUPPORTED,
00271     OTF2_ERROR_DUPLICATE_MAPPING_TABLE,
00273     OTF2_ERROR_INVALID_FILE_MODE_TRANSITION,
00275     OTF2_ERROR_COLLECTIVE_CALLBACK,
00277     OTF2_ERROR_FILE_SUBSTRATE_NOT_SUPPORTED,
00279     OTF2_ERROR_INVALID_ATTRIBUTE_TYPE,
00281     OTF2_ERROR_LOCKING_CALLBACK,
00283     OTF2_ERROR_HINT_INVALID,
00285     OTF2_ERROR_HINT_LOCKED,
00287     OTF2_ERROR_HINT_INVALID_VALUE
00288 } OTF2_ErrorCode;
00289 
00290 
00300 const char*
00301 OTF2_Error_GetName( OTF2_ErrorCode errorCode );
00302 
00303 
00312 const char*
00313 OTF2_Error_GetDescription( OTF2_ErrorCode errorCode );
00314 
00315 
00330 typedef OTF2_ErrorCode
00331 ( *OTF2_ErrorCallback )( void*          userData,
00332                          const char*    file,
00333                          uint64_t       line,
00334                          const char*    function,
00335                          OTF2_ErrorCode errorCode,
00336                          const char*    msgFormatString,
00337                          va_list        va );
00338 
00339 
00351 OTF2_ErrorCallback
00352 OTF2_Error_RegisterCallback( OTF2_ErrorCallback errorCallbackIn,
00353                              void*              userData );
00354 
00355 
00356 #ifdef __cplusplus
00357 } /* extern "C" */
00358 #endif
00359 
00360 #endif /* OTF2_ERROR_CODES_H */