00001 #ifndef IDATA_EXCEPTIONS_H
00002 #define IDATA_EXCEPTIONS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "ErrSvc/Issue.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 namespace IData {
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class Exception : public ErrSvc::Issue {
00052 public:
00053
00054
00055 Exception(const ErrSvc::Context& ctx, const std::string& what);
00056
00057 };
00058
00059
00060 class ExpNameException : public Exception {
00061 public:
00062
00063 ExpNameException(const ErrSvc::Context& ctx, const std::string& name)
00064 : Exception(ctx, "experiment name or number is not recognized: " + name)
00065 {}
00066
00067 };
00068
00069
00070 class RunNumberSpecException : public Exception {
00071 public:
00072
00073 RunNumberSpecException(const ErrSvc::Context& ctx, const std::string& spec, const std::string& msg)
00074 : Exception(ctx, "invalid run number specification: '" + spec + "' -- "+ msg)
00075 {}
00076
00077 };
00078
00079
00080 class DatasetDirError : public Exception {
00081 public:
00082
00083 DatasetDirError(const ErrSvc::Context& ctx, const std::string& str)
00084 : Exception(ctx, "dataset directory is missing: " + str) {}
00085
00086 };
00087
00088
00089 class StreamRangeSpecException : public Exception {
00090 public:
00091
00092 StreamRangeSpecException(const ErrSvc::Context& ctx, const std::string& spec, const std::string& msg)
00093 : Exception(ctx, "invalid stream range specification: '" + spec + "' -- "+ msg)
00094 {}
00095
00096 };
00097
00098 }
00099
00100 #endif // IDATA_EXCEPTIONS_H