mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-08-08 09:07:54 +00:00
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:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user