aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-28 02:35:21 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-28 02:35:21 -0400
commite382b5d2d95f2b42cbc30fde9e3be8720b83ad45 (patch)
tree9ee06dfceb43f78a5fb7059a7096a096ab506337
parent076ead369cca6d6e9543f7d65e1059cfb9e82c63 (diff)
Better error reporting
-rw-r--r--tomo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tomo.c b/tomo.c
index 9fda7791..3dde1a26 100644
--- a/tomo.c
+++ b/tomo.c
@@ -202,6 +202,7 @@ static void build_file_dependency_graph(const char *filename, table_t *dependenc
const char *import, *obj_file;
if (use_path[0] == '/' || strncmp(use_path, "~/", 2) == 0 || strncmp(use_path, "./", 2) == 0 || strncmp(use_path, "../", 3) == 0) {
import = resolve_path(use_path, filename, "");
+ if (!import) errx(1, "Couldn't resolve path: %s", use_path);
obj_file = heap_strf("%s.o", resolve_path(use_path, filename, ""));
} else {
import = resolve_path(use_path, filename, getenv("TOMO_IMPORT_PATH"));