16 #ifndef INCLUDE_NN_NLIB_EXI_EXIERRORSTATUS_H_ 17 #define INCLUDE_NN_NLIB_EXI_EXIERRORSTATUS_H_ 22 #if defined(_MSC_VER) && defined(nx_exi_EXPORTS) 23 #undef NLIB_VIS_PUBLIC 24 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 55 OUT_OF_MEMORY = kOutOfMemory,
56 ARGUMENT_ERROR = kArgumentError,
58 UNEXPECTED_EOS = kUnexpectedEos,
59 STREAM_DETACHED = kStreamDetached,
60 ILLEGAL_CHARACTER = kIllegalCharacter,
61 INTERNAL_ERROR = kInternalError,
62 NOT_SUPPORTED = kNotSupported,
63 DUPLICATE_ATTRIBUTE = kDuplicateAttribute,
64 RESERVED_PREFIX = kReservedPrefix,
65 UNDECLARING_PREFIX = kUndeclaringPrefix,
66 ATTRIBUTE_DEFAULT_NS = kAttributeDefaultNs,
67 ILLEGAL_COMMENT = kIllegalComment,
68 ILLEGAL_PI = kIllegalPi,
69 ILLEGAL_BINARY = kIllegalBinary,
70 ILLEGAL_BINARY_IDX = kIllegalBinaryIdx,
71 ILLEGAL_BINARY_EVT = kIllegalBinaryEvt,
72 SYNTAX_ERROR = kSyntaxError,
73 ILLEGAL_BINARY_HDR = kIllegalBinaryHdr,
74 FUNC_NOT_AVAILABLE = kFuncNotAvailable
82 bool SetError(ErrorValue e,
int line,
const char* filename)
NLIB_NOEXCEPT;
89 const
char* filename_;
95 #define NEXI_SET_ERROR(e) \ 96 (this->GetExiErrorStatus() ? this->GetExiErrorStatus()->SetError((e), __LINE__, __FILE__) \ 98 #define NEXI_IS_ERROR (nlib_is_error(*this->GetExiErrorStatus())) 99 #define NEXI_RESET_ERROR this->GetExiErrorStatus()->Reset() 100 #define NEXI_CHECK_OUT_OF_MEMORY \ 101 if (ExiAllocator::IsOutOfMemory()) NEXI_SET_ERROR(ExiErrorStatus::OUT_OF_MEMORY) 106 #if defined(_MSC_VER) && defined(nx_exi_EXPORTS) 107 #undef NLIB_VIS_PUBLIC 108 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 111 #endif // INCLUDE_NN_NLIB_EXI_EXIERRORSTATUS_H_ ExiErrorStatus() noexcept
Instantiates the object.
Defines constructs such as string-type typedef statements and utility macros.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#define NLIB_SAFE_BOOL(class_name, exp)
Defines a safe operator bool function in the class. Uses the C++11 explicit bool if it is available f...
Defines the allocator used by the XML parser.
Sets and stores the error status of the XML parser.
int GetLineNo() const noexcept
Returns the line number of the code that generated the error.
const char * GetFileName() const noexcept
Returns the filename of the code that generated the error.
ErrorValue
Enumerates error statuses.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
ErrorValue GetError() const noexcept
Gets a value that indicates the error status.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.