Skip to content

Commit

Permalink
More helpful error messages for adaptors
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillis committed Mar 20, 2023
1 parent 462e208 commit 8126a64
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cplex/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ def function_ptr(decl):
return 0;
} else {
snprintf(err_msg, err_msg_len, "Could not find library '%s'. "
"Consider adding the appropriate cplex folder to environmental variable '%s'.", buffer, path_env);
snprintf(err_msg, err_msg_len, "Could not find library '%s' (%scplex<CPLEX_VERSION>.%s). "
"Consider adding the appropriate cplex folder to environmental variable '%s', or specifying a different variable 'CPLEX_VERSION'.", buffer, library_prefix, library_suffix, path_env);
return 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions cplex/src/cplex.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ int (*CPXXwriteprob)(CPXCENVptr, CPXCLPptr, char const *, char const *) = NULL;

return 0;
} else {
snprintf(err_msg, err_msg_len, "Could not find library '%s'. "
"Consider adding the appropriate cplex folder to environmental variable '%s'.", buffer, path_env);
snprintf(err_msg, err_msg_len, "Could not find library '%s' (%scplex<CPLEX_VERSION>.%s). "
"Consider adding the appropriate cplex folder to environmental variable '%s', or specifying a different variable 'CPLEX_VERSION'.", buffer, library_prefix, library_suffix, path_env);
return 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions gurobi/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ def function_ptr(decl):
return 0;
} else {
snprintf(err_msg, err_msg_len, "Could not find library '%s'. "
"Consider adding the appropriate gurobi folder to environmental variable '%s'.", buffer, path_env);
snprintf(err_msg, err_msg_len, "Could not find library '%s' (%sgurobi<GUROBI_VERSION>.%s). "
"Consider adding the appropriate gurobi folder to environmental variable '%s', or specifying a different variable 'CPLEX_VERSION'.", buffer, library_prefix, library_suffix, path_env);
return 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions gurobi/src/gurobi.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ int (*GRBupdatemodel)(GRBmodel *) = NULL;

return 0;
} else {
snprintf(err_msg, err_msg_len, "Could not find library '%s'. "
"Consider adding the appropriate gurobi folder to environmental variable '%s'.", buffer, path_env);
snprintf(err_msg, err_msg_len, "Could not find library '%s' (%sgurobi<GUROBI_VERSION>.%s). "
"Consider adding the appropriate gurobi folder to environmental variable '%s', or specifying a different variable 'CPLEX_VERSION'.", buffer, library_prefix, library_suffix, path_env);
return 1;
}
}
Expand Down

0 comments on commit 8126a64

Please sign in to comment.