mirror of
https://github.com/golang/go
synced 2024-11-20 09:34:52 -07:00
cmd/compile: don't panic if syntax.ReadFile returns an error
Fixes #17772 Change-Id: I0f2094400c454828aa57a8d172dadeac4ddb6d35 Reviewed-on: https://go-review.googlesource.com/32691 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
4141054d19
commit
322436b78c
@ -17,7 +17,8 @@ func parseFile(filename string) {
|
|||||||
p := noder{baseline: lexlineno}
|
p := noder{baseline: lexlineno}
|
||||||
file, err := syntax.ReadFile(filename, p.error, p.pragma, 0)
|
file, err := syntax.ReadFile(filename, p.error, p.pragma, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatalf("syntax.ReadFile %s: %v", filename, err)
|
fmt.Printf("parse %s: %v\n", filename, err)
|
||||||
|
errorexit()
|
||||||
}
|
}
|
||||||
|
|
||||||
p.file(file)
|
p.file(file)
|
||||||
|
Loading…
Reference in New Issue
Block a user