shithub: rgbds

Download patch

ref: ab47428c0e3e9fc68621a20f42bb6e7372fa3358
parent: 23b29a9ae1a4f0f6be1ef7a2db4f59f4aace17c5
author: Anthony J. Bentley <anthony@cathet.us>
date: Mon May 27 22:23:48 EDT 2013

Improve error message.

--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -5,6 +5,7 @@
  *
  */
 
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -928,7 +929,7 @@
 		pPCSymbol->nValue += fsize;
 		fclose(f);
 	} else
-		fatalerror("File not found");
+		fatalerror("Could not open file '%s': %s", s, strerror(errno));
 }
 
 void 
@@ -973,5 +974,5 @@
 
 		fclose(f);
 	} else
-		fatalerror("File not found");
+		fatalerror("Could not open file '%s': %s", s, strerror(errno));
 }