mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +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:
parent
9b19067edc
commit
3feb720575
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user