PSHist/src/Exceptions.cpp

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: Exceptions.cpp 2050 2011-06-29 21:30:05Z salnikov@SLAC.STANFORD.EDU $
00004 //
00005 // Description:
00006 //      Class Exceptions...
00007 //
00008 // Author List:
00009 //      Andy Salnikov
00010 //
00011 //------------------------------------------------------------------------
00012 
00013 //-----------------------
00014 // This Class's Header --
00015 //-----------------------
00016 #include "PSHist/Exceptions.h"
00017 
00018 //-----------------
00019 // C/C++ Headers --
00020 //-----------------
00021 #include <boost/lexical_cast.hpp>
00022 
00023 //-------------------------------
00024 // Collaborating Class Headers --
00025 //-------------------------------
00026 
00027 //-----------------------------------------------------------------------
00028 // Local Macros, Typedefs, Structures, Unions and Forward Declarations --
00029 //-----------------------------------------------------------------------
00030 
00031 //              ----------------------------------------
00032 //              -- Public Function Member Definitions --
00033 //              ----------------------------------------
00034 
00035 namespace PSHist {
00036 
00037 Exception::Exception(const ErrSvc::Context& ctx, const std::string& what)
00038   : ErrSvc::Issue(ctx, "PSHist::Exception: " + what)
00039 {
00040 }
00041 
00042 ExceptionDuplicateName::ExceptionDuplicateName(const ErrSvc::Context& ctx, const std::string& name)
00043   : Exception(ctx, "duplicate histogram/tuple name: " + name)
00044 {  
00045 }
00046 
00047 ExceptionBins::ExceptionBins(const ErrSvc::Context& ctx)
00048   : Exception(ctx, "zero number of bins specified")
00049 {  
00050 }
00051 
00052 ExceptionAxisRange::ExceptionAxisRange(const ErrSvc::Context& ctx, double xlow, double xhigh)
00053   : Exception(ctx, "invalid axis range: low=" + boost::lexical_cast<std::string>(xlow) 
00054       + " high=" + boost::lexical_cast<std::string>(xhigh))
00055 {  
00056 }
00057 
00058 ExceptionAxisEdgeOrder::ExceptionAxisEdgeOrder(const ErrSvc::Context& ctx)
00059   : Exception(ctx, "axis edges have incorrect ordering")
00060 {  
00061 }
00062 
00063 ExceptionStore::ExceptionStore(const ErrSvc::Context& ctx, const std::string& reason)
00064   : Exception(ctx, "failed to store histograms: " + reason)
00065 {  
00066 }
00067 
00068 ExceptionDuplicateColumn::ExceptionDuplicateColumn(const ErrSvc::Context& ctx, 
00069     const std::string& tupleName, const std::string& columnName)
00070   : Exception(ctx, "duplicate tuple column name: " + tupleName + "." + columnName)
00071 {  
00072 }
00073 
00074 } // namespace PSHist

Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7