13 #include "serialization.h" 15 BEGIN_NAMESPACE_SERIALIZATION
22 xecNodeDoesNotContainExpectedType,
24 xecDCOMIndexValueSizeIsNotSupported,
25 xecDCOMValueSizeForWrittingIsNotSupported,
27 xecInnerNodeIsNotInitialized,
28 xecDCOMDocumentIsNotSet,
29 xecNodeInFunctionArgumentIsNullptr,
30 xecDocumentInFunctionArgumentIsNullptr,
32 xecFailureWhenOpeningAFile,
33 xecFailureWhenReadingABufferFromAFile,
34 xecFailureWhenParsingXmlFile,
35 xecParameterIsADummyNode
51 this->xmlExceptionCode = xmlExceptionCode;
54 const char* what()
const throw()
56 switch (this->xmlExceptionCode)
58 case XmlExceptionCode::xecParameterIsADummyNode:
59 return "Parameter is a dummy node!";
60 case XmlExceptionCode::xecNodeDoesNotContainExpectedType:
61 return "Node does not contain expected type!";
62 case XmlExceptionCode::xecNodeDoesNotExist:
63 return "Node you want to read does not exist!";
64 case XmlExceptionCode::xecValueIsOutOfRange:
65 return "Value is out of range!";
66 case XmlExceptionCode::xecInnerNodeIsNotInitialized:
67 return "Inner node is not initialized!";
68 case XmlExceptionCode::xecDCOMDocumentIsNotSet:
69 return "DCOM document is not set!";
70 case XmlExceptionCode::xecNodeInFunctionArgumentIsNullptr:
71 return "Node in function argument is nullptr!";
72 case XmlExceptionCode::xecDocumentInFunctionArgumentIsNullptr:
73 return "Document in function argument is nullptr!";
74 case XmlExceptionCode::xecFileNameIsNotSet:
75 return "File name is not set!";
76 case XmlExceptionCode::xecFailureWhenOpeningAFile:
77 return "Failure when opening a file!";
78 case XmlExceptionCode::xecFailureWhenReadingABufferFromAFile:
79 return "Failure when reading a buffer from a file!";
80 case XmlExceptionCode::xecFailureWhenParsingXmlFile:
81 return "Failure when parsing Xml file!";
82 case XmlExceptionCode::xecDCOMIndexValueSizeIsNotSupported:
83 return "DCOM index size is limited to values of long type!";
84 case XmlExceptionCode::xecDCOMValueSizeForWrittingIsNotSupported:
85 return "Values you can write to DCOM node are limited to values of long type!";
87 return "XmlExceptionCode is not set!";
93 return xmlExceptionCode;
100 END_NAMESPACE_SERIALIZATION
XmlException(XmlExceptionCode xmlExceptionCode)
Constructor that sets an XmlExceptionCode.
Definition: xml_exception.h:49
XmlException class that inherits from std::exception and is used for exception handling in xml serial...
Definition: xml_exception.h:42
XmlExceptionCode
enums for exception types
Definition: xml_exception.h:20