mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
handle bad json in exd_struct_gen
This commit is contained in:
parent
39fc43a27a
commit
23aad09227
1 changed files with 11 additions and 2 deletions
|
@ -127,8 +127,17 @@ std::string generateStruct( const std::string& exd )
|
|||
}
|
||||
|
||||
auto sheet = nlohmann::json();
|
||||
|
||||
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" ] )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue