psana/src/Exceptions.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: Exceptions.cpp 5116 2013-01-14 21:32:08Z salnikov@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class Exceptions...
00007 //
00008 // Author List:
00009 //      Andrei Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "psana/Exceptions.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 #include <cerrno>
00022 #include <string.h>
00023 #include <dlfcn.h>
00024 
00025 //-------------------------------
00026 // Collaborating Class Headers --
00027 //-------------------------------
00028 
00029 //-----------------------------------------------------------------------
00030 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00031 //-----------------------------------------------------------------------
00032 
00033 //              ----------------------------------------
00034 //              -- Public Function Member Definitions --
00035 //              ----------------------------------------
00036 
00037 namespace psana {
00038 
00039 Exception::Exception( const ErrSvc::Context& ctx, const std::string& what )
00040   : ErrSvc::Issue( ctx, "psana::Exception: " + what )
00041 {
00042 }
00043 
00044 ExceptionModuleName::ExceptionModuleName ( const ErrSvc::Context& ctx, const std::string& module )
00045   : Exception( ctx, "invalid module name: " + module)
00046 {  
00047 }
00048 
00049 ExceptionErrno::ExceptionErrno ( const ErrSvc::Context& ctx, const std::string& what )
00050   : Exception( ctx, what + ": " + strerror(errno) )
00051 {
00052 }
00053 
00054 ExceptionDlerror::ExceptionDlerror ( const ErrSvc::Context& ctx, const std::string& what )
00055   : Exception( ctx, what + ": " + dlerror() )
00056 {
00057 }
00058 
00059 ExceptionAbort::ExceptionAbort(const ErrSvc::Context& ctx, const std::string& what)
00060   : Exception(ctx, what)
00061 {
00062 }
00063 
00064 } // namespace psana

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7