From c6596f656eb56d8e98114fdbd21faa913733e9e4 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 11 Apr 2010 14:52:06 -0700 Subject: gc: distinguish fatal compiler bug from error+exit R=ken2 CC=golang-dev http://codereview.appspot.com/902044 --- src/cmd/gc/obj.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/cmd/gc/obj.c') diff --git a/src/cmd/gc/obj.c b/src/cmd/gc/obj.c index 12054645f..97786cd6e 100644 --- a/src/cmd/gc/obj.c +++ b/src/cmd/gc/obj.c @@ -12,8 +12,11 @@ void dumpobj(void) { bout = Bopen(outfile, OWRITE); - if(bout == nil) - fatal("cant open %s", outfile); + if(bout == nil) { + flusherrors(); + print("can't create %s: %r\n", outfile); + errorexit(); + } Bprint(bout, "%s\n", thestring); Bprint(bout, " exports automatically generated from\n"); -- cgit v1.2.3