The current status of continue_on_error cannot be obtained. This is very incontinent when one wants to write a library that should be transparent in respect to RTS; set in a LRE test or set manually by the user.
The same problem is solved for debugging: one can obtain the current setting and temporary change the setting in a script / library.
Proposal:
The function lr_continue_on_error() is declared as void. It is totally transparent when this function will return the the status of continue_on_error when the function lr_continue_on_error() was called. This prevents introducing a new API function and might be quick to implement.
Protocols/Languages: C, Java, JavaScript
Just an example:
int my_lib_init() { int org_on_error_status; . . . org_on_error_status = lr_continue_on_error(LR_ON_ERROR_CONTINUE); web_custom_request("Validate if service is running", .... ); lr_continue_on_error(org_on_error_status); if( web_get_int_property(HTTP_INFO_RETURN_CODE) != 200 ) { lr_log_message("Service for my_lib not found, functionality stays disabled."); return LR_FAIL; // Note this error can be ignored be caller. } // Now we can setup the library details . . . return LR_PASS; }
Reward contributions via likes or 'verified answers'