code-gen: fail fast

Stop the code generation process early if any of its
generators fail rather than skipping it with the log message.
This commit is contained in:
Alex Bezzubov 2022-10-14 16:13:53 +02:00
parent 9b19067edc
commit 3feb720575

View File

@ -134,7 +134,7 @@ func main() {
for _, file := range fileList { for _, file := range fileList {
if err := file.generate(file.fileToParse, file.samplesDir, file.outPath, file.tmplPath, file.tmplName, file.commit); err != nil { if err := file.generate(file.fileToParse, file.samplesDir, file.outPath, file.tmplPath, file.tmplName, file.commit); err != nil {
log.Printf("error generating template %q to %q: %+v", file.tmplPath, file.outPath, err) log.Fatalf("error generating template %q to %q: %+v", file.tmplPath, file.outPath, err)
} }
} }
} }