mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-30 22:17:13 +02:00
Separated major non mandatory libraries into their onwn modules.
Consolidated and simplified the module API system. Various other fixes and improvements.
This commit is contained in:
25
modules/xml/Common.cpp
Normal file
25
modules/xml/Common.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
#include "Common.hpp"
|
||||
#include "Module.hpp"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
namespace SqMod {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool ParseResult::Validate() const
|
||||
{
|
||||
if (m_Doc)
|
||||
return true;
|
||||
// Invalid document reference
|
||||
_SqMod->SqThrow("Invalid XML document reference");
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ParseResult::Check() const
|
||||
{
|
||||
if (m_Result.status != status_ok)
|
||||
_SqMod->SqThrow("XML parse error [%s]", m_Result.description());
|
||||
}
|
||||
|
||||
} // Namespace:: SqMod
|
Reference in New Issue
Block a user