00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "psana/Exceptions.h"
00017
00018
00019
00020
00021 #include <cerrno>
00022 #include <string.h>
00023 #include <dlfcn.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
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 }