+added source file information to error handling; *fixed a memory leak.
This commit is contained in:
parent
7f81719ba1
commit
d290aeb20e
4
HISTORY
4
HISTORY
@ -1,3 +1,7 @@
|
|||||||
|
Jan. 17 2016
|
||||||
|
Added source file information to error handling
|
||||||
|
Fixed a memory leak with sub routine which returns a string
|
||||||
|
|
||||||
Jan. 16 2016
|
Jan. 16 2016
|
||||||
Added a range of integer syntax for the LIST statement, eg. LIST(m TO n)
|
Added a range of integer syntax for the LIST statement, eg. LIST(m TO n)
|
||||||
Added extra importing directories support to shell
|
Added extra importing directories support to shell
|
||||||
|
537
core/my_basic.c
537
core/my_basic.c
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1077,12 +1077,15 @@ static void _on_stepped(struct mb_interpreter_t* s, int p, unsigned short row, u
|
|||||||
|
|
||||||
static void _on_error(struct mb_interpreter_t* s, mb_error_e e, char* m, char* f, int p, unsigned short row, unsigned short col, int abort_code) {
|
static void _on_error(struct mb_interpreter_t* s, mb_error_e e, char* m, char* f, int p, unsigned short row, unsigned short col, int abort_code) {
|
||||||
mb_unrefvar(s);
|
mb_unrefvar(s);
|
||||||
mb_unrefvar(f);
|
|
||||||
mb_unrefvar(p);
|
mb_unrefvar(p);
|
||||||
if(SE_NO_ERR != e) {
|
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);
|
||||||
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int _on_import(struct mb_interpreter_t* s, const char* p) {
|
static int _on_import(struct mb_interpreter_t* s, const char* p) {
|
||||||
if(!importing_dirs)
|
if(!importing_dirs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user