From f6d17ef9cf11353a2c8ff05425ca9abf418c8f3a Mon Sep 17 00:00:00 2001 From: paladin-t Date: Fri, 19 Feb 2016 17:27:37 +0800 Subject: [PATCH] *polished error promption text; *polished code. --- core/my_basic.c | 2 +- shell/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/my_basic.c b/core/my_basic.c index ab8b822..2aa4896 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -131,7 +131,7 @@ extern "C" { #define DON(__o) ((__o) ? ((_object_t*)((__o)->data)) : 0) #define DON2(__a) (((__a) && *(__a)) ? (_object_t*)((*((_ls_node_t**)(__a)))->data) : 0) -#define TON(__t) (((__t) && *(__t)) ? ((_object_t*)(((_tuple3_t*)(*(__t)))->e1)) : 0) +#define TON(__t) (((__t) && *(__t)) ? (_object_t*)(((_tuple3_t*)(*(__t)))->e1) : 0) #define _IS_VAR_ARGS(__v) ((__v) == &_VAR_ARGS) diff --git a/shell/main.c b/shell/main.c index d777a4c..b3adad9 100755 --- a/shell/main.c +++ b/shell/main.c @@ -1268,9 +1268,9 @@ static void _on_error(struct mb_interpreter_t* s, mb_error_e e, char* m, char* f if(SE_NO_ERR != e) { if(f) { - _printf("Error:\n [LINE] %d, [COL] %d, [FILE] %s,\n [CODE] %d, [MESSAGE] %s, [ABORT CODE] %d.\n", row, col, f, e, m, abort_code); + _printf("Error:\n Line %d, Col %d in File: %s\n Code: %d; Message: %s; Abort Code: %d.\n", row, col, f, e, m, abort_code); } else { - _printf("Error:\n [LINE] %d, [COL] %d,\n [CODE] %d, [MESSAGE] %s, [ABORT CODE] %d.\n", row, col, e, m, abort_code); + _printf("Error:\n Line %d, Col %d\n Code: %d; Message: %s; Abort Code: %d.\n", row, col, e, m, abort_code); } } }