00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef NEXCEPTION_H
00023 #define NEXCEPTION_H
00024
00029 #include "nstring.h"
00030
00034 typedef nint32 Flag;
00035
00039 class DllDeclSpec NException {
00040 public:
00044 enum Module {
00045 NOT_SET,
00046 OS,
00047 BASE,
00048 BASEIO,
00049 OUTPUT,
00050 NETWORK,
00051 XML,
00052 SECURITY,
00053 DBAL,
00054 TOOLS,
00055 USERAPP,
00056 USERLIB
00057 };
00058
00062 static const Flag EX_NONE;
00063
00067 static const Flag EX_OUT_OF_BOUNDS;
00068
00072 NException(void);
00073
00080 NException(const NString &desc, Module module, Flag flag = EX_NONE);
00081
00085 virtual ~NException(void);
00086
00087
00092 void setDescription(const NString &desc);
00093
00098 NString getDescription(void) const;
00099
00105 void setModule(Module module);
00106
00111 NException::Module getModule(void) const;
00112
00113
00118 NException &operator=(const NException &other);
00119
00120
00125 void setFlag(Flag flag);
00130 Flag getFlag(void) const;
00131
00132 protected:
00137 void setErrorId(nint16 error_id);
00138
00139 private:
00140 NString m_description;
00141 Module m_module;
00142 Flag m_flag;
00143 };
00144
00145 #endif // NEXCEPTION_H