Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:13:54

0001 //  AIDA Detector description implementation 
0002 //--------------------------------------------------------------------------
0003 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0004 // All rights reserved.
0005 //
0006 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0007 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0008 //
0009 //  \author  Markus Frank
0010 //  \date    2016-02-02
0011 //  \version 1.0
0012 //
0013 //==========================================================================
0014 
0015 // Framework include files
0016 #include <DD4hep/Errors.h>
0017 
0018 // C/C++ includes
0019 #include <cerrno>
0020 #include <cstring>
0021 
0022 #define IMPLEMENT(x,y) std::string x () { return ::strerror( errno = y ); }
0023 
0024 namespace dd4hep { namespace Errors  {
0025     IMPLEMENT(noPermission,EPERM)       //  1
0026     IMPLEMENT(noEntry,ENOENT)           //  2
0027     IMPLEMENT(ioError,EIO)              //  5
0028     IMPLEMENT(invalidArg,EINVAL)        // 22
0029     IMPLEMENT(noSys,ENOSYS)             // 38
0030     IMPLEMENT(cancelled,ECANCELED)      // 125
0031 #ifdef __APPLE__
0032     IMPLEMENT(linkRange,EINVAL)         // 48  does not exist on apple
0033     IMPLEMENT(noKey,EINVAL)             // 126 does not exist on apple
0034 #else
0035     IMPLEMENT(linkRange,ELNRNG)         // 48
0036     IMPLEMENT(noKey,ENOKEY)             // 126
0037 #endif
0038   }}