DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Errors.cpp
Go to the documentation of this file.
1 // AIDA Detector description implementation
2 //--------------------------------------------------------------------------
3 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
4 // All rights reserved.
5 //
6 // For the licensing terms see $DD4hepINSTALL/LICENSE.
7 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
8 //
9 // \author Markus Frank
10 // \date 2016-02-02
11 // \version 1.0
12 //
13 //==========================================================================
14 
15 // Framework include files
16 #include <DD4hep/Errors.h>
17 
18 // C/C++ includes
19 #include <cerrno>
20 #include <cstring>
21 
22 #define IMPLEMENT(x,y) std::string x () { return ::strerror( errno = y ); }
23 
24 namespace dd4hep { namespace Errors {
25  IMPLEMENT(noPermission,EPERM) // 1
26  IMPLEMENT(noEntry,ENOENT) // 2
27  IMPLEMENT(ioError,EIO) // 5
28  IMPLEMENT(invalidArg,EINVAL) // 22
29  IMPLEMENT(noSys,ENOSYS) // 38
30  IMPLEMENT(cancelled,ECANCELED) // 125
31 #ifdef __APPLE__
32  IMPLEMENT(linkRange,EINVAL) // 48 does not exist on apple
33  IMPLEMENT(noKey,EINVAL) // 126 does not exist on apple
34 #else
35  IMPLEMENT(linkRange,ELNRNG) // 48
36  IMPLEMENT(noKey,ENOKEY) // 126
37 #endif
38  }}
dd4hep::Errors::noEntry
std::string noEntry()
System error string for ENOENT. Sets errno accordingly.
dd4hep::Errors::ioError
std::string ioError()
System error string for EIO. Sets errno accordingly.
dd4hep::Errors::invalidArg
std::string invalidArg()
System error string for EINVAL. Sets errno accordingly.
dd4hep::Errors::noKey
std::string noKey()
System error string for ENOKEY. Sets errno accordingly.
dd4hep::Errors::IMPLEMENT
IMPLEMENT(noPermission, EPERM) IMPLEMENT(noEntry
Errors.h
dd4hep::Errors::noSys
std::string noSys()
System error string for ENOSYS. Sets errno accordingly.
dd4hep::Errors::cancelled
std::string cancelled()
System error string for ECANCELED. Sets errno accordingly.
dd4hep::Errors::noPermission
std::string noPermission()
System error string for EPERM. Sets errno accordingly.
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::Errors::linkRange
std::string linkRange()
System error string for ELNRNG. Sets errno accordingly.