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