summaryrefslogtreecommitdiffstats
path: root/edify/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'edify/main.c')
-rw-r--r--edify/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/edify/main.c b/edify/main.c
index 4d65da2d8..c95968376 100644
--- a/edify/main.c
+++ b/edify/main.c
@@ -158,7 +158,14 @@ int main(int argc, char** argv) {
printf("parse returned %d\n", error);
if (error == 0) {
char* result = Evaluate(NULL, root);
- printf("result is [%s]\n", result == NULL ? "(NULL)" : result);
+ if (result == NULL) {
+ char* errmsg = GetError();
+ printf("result was NULL, message is: %s\n",
+ (errmsg == NULL ? "(NULL)" : errmsg));
+ ClearError();
+ } else {
+ printf("result is [%s]\n", result);
+ }
}
return 0;
}