Skip to content

Commit a3370d2

Browse files
committed
Improved error message for objects that are not found
1 parent 55ae2bb commit a3370d2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Version 6.5.3
2+
- Improved error message for objects that are not found
3+
14
Version 6.5.2
25
- Really added BASIC date/time functions (inadvertently not checked in)
36
- Fixed *scanf() for floating point values

spinc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* +--------------------------------------------------------------------
2727
*/
2828
#include <stdlib.h>
29+
#include <errno.h>
2930
#include <string.h>
3031
#include <stdarg.h>
3132
#include <ctype.h>
@@ -643,9 +644,10 @@ doParseFile(const char *name, Module *P, int *is_dup, AST *paramlist)
643644

644645
f = fopen(fname, "r");
645646
if (!f) {
646-
fprintf(stderr, "Unable to open file `%s': ", fname);
647-
perror("");
648-
free(fname);
647+
int lineNum = current->Lptr->lineCounter;
648+
AST *errAst = DummyLineAst(lineNum);
649+
650+
ERROR(errAst, "Unable to open file `%s': %s", fname, strerror(errno));
649651
exit(1);
650652
}
651653
AddSourceFile(shortName, fullName);

version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#define VERSION_MAJOR 6
88
#define VERSION_MINOR 5
9-
#define VERSION_REV 2
10-
//#define BETA "-beta"
9+
#define VERSION_REV 3
10+
#define BETA "-beta"
1111

1212
#define VERSIONSTR version_string
1313

0 commit comments

Comments
 (0)