diff --git a/src/tools/exd_struct_gen/main.cpp b/src/tools/exd_struct_gen/main.cpp index c418dd61..1fbcb042 100644 --- a/src/tools/exd_struct_gen/main.cpp +++ b/src/tools/exd_struct_gen/main.cpp @@ -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" ] ) {