@@ -66,7 +66,10 @@ void DumpClasses(const std::vector<IntermediateSchemaClass>& classes, std::files
6666 {
6767 if (!std::filesystem::is_directory (schemaPath / intermediateClass.module ))
6868 if (!std::filesystem::create_directory (schemaPath / intermediateClass.module ))
69- return ;
69+ {
70+ spdlog::error (" Failed to create directory for class module '{}'" , intermediateClass.module );
71+ continue ;
72+ }
7073
7174 // Some classes have :: in them which we can't save.
7275 auto sanitizedFileName = intermediateClass.name ;
@@ -106,7 +109,7 @@ void DumpClasses(const std::vector<IntermediateSchemaClass>& classes, std::files
106109 for (const auto & field : intermediateClass.fields )
107110 {
108111 spdlog::trace (" Dumping field: '{}' for class: '{}'" , field.name , intermediateClass.name );
109- // Output metadata entires as comments before the field definition
112+ // Output metadata entries as comments before the field definition
110113 for (const auto & metadata : field.metadata )
111114 {
112115 OutputMetadataEntry (metadata, output, true );
@@ -126,7 +129,10 @@ void DumpEnums(const std::vector<IntermediateSchemaEnum>& enums, std::filesystem
126129 {
127130 if (!std::filesystem::is_directory (schemaPath / intermediateEnum.module ))
128131 if (!std::filesystem::create_directory (schemaPath / intermediateEnum.module ))
129- return ;
132+ {
133+ spdlog::error (" Failed to create directory for enum module '{}'" , intermediateEnum.module );
134+ continue ;
135+ }
130136
131137 // Some classes have :: in them which we can't save.
132138 auto sanitizedFileName = intermediateEnum.name ;
@@ -137,6 +143,7 @@ void DumpEnums(const std::vector<IntermediateSchemaEnum>& enums, std::filesystem
137143
138144 std::ofstream output ((schemaPath / intermediateEnum.module / sanitizedFileName).replace_extension (" .h" ));
139145
146+ spdlog::trace (" Dumping enum: '{}'" , intermediateEnum.name );
140147 for (const auto & metadata : intermediateEnum.metadata )
141148 {
142149 OutputMetadataEntry (metadata, output, false );
@@ -147,7 +154,7 @@ void DumpEnums(const std::vector<IntermediateSchemaEnum>& enums, std::filesystem
147154
148155 for (const auto & member : intermediateEnum.members )
149156 {
150- // Output metadata entires as comments before the field definition
157+ // Output metadata entries as comments before the field definition
151158 for (const auto & metadata : member.metadata )
152159 {
153160 OutputMetadataEntry (metadata, output, true );
@@ -168,7 +175,10 @@ void Dump(const std::vector<IntermediateSchemaEnum>& enums, const std::vector<In
168175
169176 if (!std::filesystem::is_directory (schemaPath))
170177 if (!std::filesystem::create_directory (schemaPath))
178+ {
179+ spdlog::error (" Failed to create schemas directory" );
171180 return ;
181+ }
172182
173183 std::map<std::string, std::unordered_set<std::string>> foundFiles;
174184
0 commit comments