Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ZORBA_ERROR_API_H
00018 #define ZORBA_ERROR_API_H
00019
00020 #include <zorba/internal/system_diagnostic.h>
00021 #include <zorba/internal/qname.h>
00022
00023 namespace zorba {
00024
00025 class Diagnostic;
00026 namespace serialization {
00027 class Archiver;
00028 void operator&( serialization::Archiver&, const Diagnostic*& );
00029 }
00030
00031
00032
00033 typedef Diagnostic Error;
00034
00035
00036
00037
00038 typedef internal::SystemDiagnostic<internal::XQueryErrQName> XQueryErrorCode;
00039
00040
00041
00042
00043 typedef internal::SystemDiagnostic<internal::ZorbaErrQName> ZorbaErrorCode;
00044
00045
00046
00047
00048
00049
00050 class ZORBA_DLL_PUBLIC UserError : public Diagnostic {
00051 public:
00052
00053
00054
00055
00056
00057 UserError( UserError const &from );
00058
00059
00060
00061
00062 ~UserError();
00063
00064
00065
00066
00067
00068
00069
00070 UserError& operator=( UserError const &from );
00071
00072
00073 diagnostic::QName const& qname() const;
00074 diagnostic::category category() const;
00075
00076 protected:
00077
00078 Diagnostic const* clone() const;
00079
00080 private:
00081 typedef internal::VariableQName<std::string> QName;
00082 QName qname_;
00083
00084
00085
00086
00087
00088
00089
00090
00091 UserError( char const *ns, char const *prefix, char const *localname );
00092
00093 friend class UserException;
00094 friend UserError make_user_error( char const*, char const*, char const* );
00095
00096
00097 UserError( serialization::Archiver& );
00098 friend void serialization::operator&( serialization::Archiver&,
00099 const Diagnostic*& );
00100 };
00101
00102
00103
00104 }
00105 #endif
00106
00107
00108
00109
00110
00111