exceptions.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __INTERFACES_GENERATOR_EXCEPTIONS_H_
00024 #define __INTERFACES_GENERATOR_EXCEPTIONS_H_
00025
00026 #include <core/exception.h>
00027
00028
00029
00030
00031
00032 class InterfaceGeneratorInvalidDocumentException : public fawkes::Exception {
00033 public:
00034
00035
00036
00037 InterfaceGeneratorInvalidDocumentException(const char *msg)
00038 : fawkes::Exception("Interface document invalid.")
00039 {
00040 append(msg);
00041 }
00042 };
00043
00044
00045
00046
00047
00048 class InterfaceGeneratorInvalidContentException : public fawkes::Exception {
00049 public:
00050
00051
00052
00053 InterfaceGeneratorInvalidContentException(const char *msg)
00054 : fawkes::Exception()
00055 {
00056 append("Invalid content: %s", msg);
00057 }
00058 };
00059
00060
00061
00062
00063
00064
00065 class InterfaceGeneratorInvalidTypeException : public fawkes::Exception {
00066 public:
00067
00068
00069
00070
00071
00072 InterfaceGeneratorInvalidTypeException(const char *item, const char *name, const char *type)
00073 : fawkes::Exception()
00074 {
00075 append("Invalid type for %s item '%s': %s", item, name, type);
00076 }
00077 };
00078
00079
00080
00081
00082 class InterfaceGeneratorInvalidValueException : public fawkes::Exception {
00083 public:
00084
00085
00086
00087
00088
00089 InterfaceGeneratorInvalidValueException(const char *name, const char *type, const char *value)
00090 : fawkes::Exception()
00091 {
00092 append("Invalid value for '%s' of type %s: %s", name, type, value);
00093 }
00094 };
00095
00096
00097
00098
00099 class InterfaceGeneratorInvalidAttributeException : public fawkes::Exception {
00100 public:
00101
00102
00103
00104
00105
00106 InterfaceGeneratorInvalidAttributeException(const char *name, const char *type, const char *attr)
00107 : fawkes::Exception()
00108 {
00109 append("Attribute '%s' may not be specified for '%s' of type %s", attr, name, type);
00110 }
00111 };
00112
00113
00114
00115
00116
00117 class InterfaceGeneratorInvalidFlagException : public fawkes::Exception {
00118 public:
00119
00120
00121
00122
00123 InterfaceGeneratorInvalidFlagException(const char *name, const char *flag)
00124 : fawkes::Exception()
00125 {
00126 append("Illegal flag '%s' set for %s", flag, name);
00127 }
00128 };
00129
00130
00131
00132
00133
00134 class InterfaceGeneratorMissingAttributeException : public fawkes::Exception {
00135 public:
00136
00137
00138
00139
00140
00141 InterfaceGeneratorMissingAttributeException(const char *name, const char *type, const char *attr)
00142 : fawkes::Exception()
00143 {
00144 append("Attribute '%s' is required '%s' of type %s", attr, name, type);
00145 }
00146 };
00147
00148
00149
00150 class InterfaceGeneratorAmbiguousNameException : public fawkes::Exception {
00151 public:
00152
00153
00154
00155
00156 InterfaceGeneratorAmbiguousNameException(const char *name, const char *item)
00157 : fawkes::Exception()
00158 {
00159 append("There are multiple %s items with name '%s'", item, name);
00160 }
00161 };
00162
00163
00164 #endif