From 62cc0f457ce845770d17316e6f2087313bcd7119 Mon Sep 17 00:00:00 2001 From: mfranz <mfranz> Date: Sat, 14 Jun 2008 14:25:34 +0000 Subject: [PATCH] load_nasal: fix module and let it return whether there was an error --- Nasal/io.nas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nasal/io.nas b/Nasal/io.nas index 95f29fe79..46e79ca58 100644 --- a/Nasal/io.nas +++ b/Nasal/io.nas @@ -46,12 +46,13 @@ var load_nasal = func(file, module = nil) { var err = []; printlog("info", "loading ", file, " into namespace ", module); - var code = call(func compile(io.readfile(file), file), nil, err); + var code = call(func compile(readfile(file), file), nil, err); if(size(err)) return print(file ~ ": " ~ err[0]); call(bind(code, globals), nil, nil, globals[module], err); - printerror(err); + debug.printerror(err); + return size(err); } # The following two functions are for reading generic XML files into