1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 06:27:45 +00:00

Merge pull request #590 from NotAdam/develop

fix clang builds & exd_struct_gen error handling
This commit is contained in:
Adam 2019-10-29 19:06:28 +10:00 committed by GitHub
commit 7942f22252
2 changed files with 12 additions and 3 deletions

View file

@ -127,8 +127,17 @@ std::string generateStruct( const std::string& exd )
}
auto sheet = nlohmann::json();
std::ifstream defJson( path );
defJson >> sheet;
try
{
std::ifstream defJson( path );
defJson >> sheet;
}
catch( const std::exception& ex )
{
Logger::error( "Failed parsing json definition, err: {} file: {}", ex.what(), path );
return "";
}
for( auto& definition : sheet[ "definitions" ] )
{

View file

@ -5,7 +5,7 @@
namespace Sapphire::World::Territory::Housing
{
class HousingInteriorTerritory : public Territory
class HousingInteriorTerritory : public Sapphire::Territory
{
public:
HousingInteriorTerritory( Common::LandIdent ident, uint16_t territoryTypeId,