+added some location parameters to the mb_get_last_error function.
This commit is contained in:
parent
b12a60650d
commit
dcc187a5ea
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
||||
Nov. 1 2017
|
||||
Added some location parameters to the mb_get_last_error function
|
||||
|
||||
Oct. 30 2017
|
||||
Added support to apply the STR statement to a type value
|
||||
Fixed a referencing bug with an unnamed array
|
||||
|
Binary file not shown.
@ -14153,7 +14153,7 @@ _exit:
|
||||
}
|
||||
|
||||
/* Get the last error information */
|
||||
mb_error_e mb_get_last_error(struct mb_interpreter_t* s) {
|
||||
mb_error_e mb_get_last_error(struct mb_interpreter_t* s, const char** file, int* pos, unsigned short* row, unsigned short* col) {
|
||||
mb_error_e result = SE_NO_ERR;
|
||||
|
||||
if(!s)
|
||||
@ -14161,6 +14161,10 @@ mb_error_e mb_get_last_error(struct mb_interpreter_t* s) {
|
||||
|
||||
result = s->last_error;
|
||||
s->last_error = SE_NO_ERR; /* Clear error state */
|
||||
if(file) *file = s->last_error_file;
|
||||
if(pos) *pos = s->last_error_pos;
|
||||
if(row) *row = s->last_error_row;
|
||||
if(col) *col = s->last_error_col;
|
||||
|
||||
_exit:
|
||||
return result;
|
||||
@ -15332,7 +15336,7 @@ _elseif:
|
||||
if(ast) la = ast;
|
||||
}
|
||||
if(!ast) {
|
||||
mb_get_last_error(s);
|
||||
mb_get_last_error(s, 0, 0, 0, 0);
|
||||
_handle_error_on_obj(s, SE_RN_ENDIF_EXPECTED, s->source_file, DON(la), MB_FUNC_ERR, _exit, result);
|
||||
}
|
||||
if(ast && _IS_FUNC(ast->data, _core_endif)) {
|
||||
|
@ -677,7 +677,7 @@ MBAPI int mb_debug_set_stepped_handler(struct mb_interpreter_t* s, mb_debug_step
|
||||
MBAPI const char* mb_get_type_string(mb_data_e t);
|
||||
|
||||
MBAPI int mb_raise_error(struct mb_interpreter_t* s, void** l, mb_error_e err, int ret);
|
||||
MBAPI mb_error_e mb_get_last_error(struct mb_interpreter_t* s);
|
||||
MBAPI mb_error_e mb_get_last_error(struct mb_interpreter_t* s, const char** file, int* pos, unsigned short* row, unsigned short* col);
|
||||
MBAPI const char* mb_get_error_desc(mb_error_e err);
|
||||
MBAPI int mb_set_error_handler(struct mb_interpreter_t* s, mb_error_handler_t h);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user