Commit f05839cc authored by Sébastien Timmermans's avatar Sébastien Timmermans
Browse files

[ErrMsg] load with loader err_msg clean

parent 1c7c6ce9
......@@ -38,6 +38,10 @@ MbsData* mbs_load(const char* mbs_filename, const char* build_path)
loader = mbs_new_loader();
mbs_data = mbs_load_with_loader(mbs_filename, build_path, loader);
mbs_delete_loader(loader);
if (mbs_data == NULL)
{
mbs_error_msg("in mbs_load !! \n");
}
return mbs_data;
}
......@@ -61,7 +65,7 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
mbs_infos = mbs_info_reader(mbs_filename);
if (!mbs_infos){
mbs_msg(">>LOAD>> unable to create MbsInfo.\n");
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + _MBS_ERR_LOW_FILES);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + _MBS_ERR_LOW_FILES);
return NULL;
}
}
......@@ -83,7 +87,7 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
{
mbs_msg(">>LOAD>> build_path is not defined \n");
mbs_msg("\n>>LOAD>> Check your files names and paths \n\n");
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD +_MBS_ERR_LOW_FILES);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD +_MBS_ERR_LOW_FILES);
free(symbolicLib_name);
free(symbolicLib_path);
free(userfctLib_name);
......@@ -166,7 +170,8 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
mbs_delete_infos(mbs_infos);
}
mbs_msg("\n>>LOAD>> find_project_path \n\n");
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
mbs_delete_data(mbs_data);
return NULL;
}
......@@ -176,7 +181,7 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
if (opts->load_symb_user!=LOAD_NONE) {
err = mbs_load_symbolic_functions(mbs_data, symbolicLib_path, symbolicLib_name);
if (err < 0){
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
free(symbolicLib_name);
free(symbolicLib_path);
free(userfctLib_name);
......@@ -195,7 +200,7 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
if(opts->load_symb_user==LOAD_ALL) {
err = mbs_load_user_functions(mbs_data, userfctLib_path, userfctLib_name);
if (err < 0){
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + err);
free(symbolicLib_name);
free(symbolicLib_path);
free(userfctLib_name);
......@@ -230,7 +235,7 @@ MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path,
}
mbs_msg("\n>>LOAD>> mbs_info_to_data \n\n");
mbs_error_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + _MBS_ERR_LOW_FILES);
mbs_msg("[%d] in mbs_load_with_loader !! \n", _MBS_ERR_MOD_LOAD + _MBS_ERR_LOW_FILES);
return NULL;
}
......@@ -740,7 +745,7 @@ MbsData* mbs_info_to_data(MbsInfos* mbs_infos, MbsData* s)
{
mbs_msg(">>LOAD>> Error while fetching user_model number \n");
mbs_msg("\n>>LOAD>> Please Re-generated your user_model Files !!! \n\n");
mbs_error_msg("[%d] in mbs_load_with_loader \n", _MBS_ERR_MOD_LOAD);
mbs_msg("[%d] in mbs_load_with_loader \n", _MBS_ERR_MOD_LOAD);
return NULL;
}
free_ivec_1(user_model_list_c);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment